Posts

c# - Maze algorithm path finder -

I am trying to find a path to a maze, the code below, it seems that inside the recursive soul loop It goes but keep getting out of it, after the second condition if the condition is that what I am doing wrong here can someone help me please? The correct setting in the form of IM setting and wrong by default. recursive solution (0, 0); Public static int [,] Maze = {{0, 0, 0, 1}, {1, 1, 0, 0, 0, 1}, 0, 0, 0, 1, 0, 0}, {0 , 1, 1, 0, 0, 1}, {0, 1, 0, 0, 1,}, {0, 1, 0, 0, 0, 1}}; Public static boolean recursive solv (int row, int coal) {boolean [,] is = new boolean [6, 6]; Boolean [,] True Text = New Boolean [6, 6]; // If the solution of the maze (maze [row, cola] == 1 || these [row, cola]) {return false; } And if (line == 0 || line == 6 - 1 || tomorrow == 0] soft == 6 - 1) {right path [row, cola] = true; Back true; } And {were [row, color] = true; Recursive solvieve (line-1), (recursive solvieve (line-1), recursive solvieve (row + 1, cola) || recursive solvieve (line, cola-1) || rec...

How can I align text to an image automatically in PHP? -

Image
I have some lines of code to create a plain image with some given PHP text. But when I give the width of the image text then goes out of the image. How can I align the text inside the image with a fixed width but dynamic height? My code is given below. header ("content-type: image / PNG"); $ String = 'Lorem Ipsum is simply the dummy text of the printing and typesetting industry; Lorem Ipsum 1500s' has been the industry standard dummy text since; $ Font = 4; $ Width = ImageFontWidth ($ font) * strlen ($ string); $ Height = ImageFontHeight ($ font); $ Im = @imagecreate (200,500); $ Background_color = imagecolorallocate ($ im, 255, 255, 255); // white background $ text_color = imagecolorallocate ($ im, 0, 0,0); // black text imagestring ($ im, $ font, 0, 0, $ string, $ text_color); Imagepng ($ im); I want this image to automatically adjust the text based on the given paragraph. How to do this You can try this: (based on the contributions of Gannon) head...

javascript - How to find and replace xml node value in JQuery -

I need help finding and changing a value using JQuery in XML node, please tell me below that my scenario Is, var metadata = '& lt; Control type = "table" id = "4900a2a9-47d7-4d3b-9a35-fdd32b185730" & gt; & Lt; / Control & gt; & Lt; Control Type = "Text Box" ID = "7a49 9F6-16C1-4-88 9-A0-FA2A7Fi886" & gt; & Lt; / Control & gt; '; In the above XML structure, I want to search for id = "4900a2a9-47d7-4d3b-9a35-fdd32b185730" and replace it with id = "91e3cbe6-8168-40be-bf26-ccdd6acb1e17" "Please suggest in jQuery. Below I've tried, var oldID = "4900a2a9-47d7-4d3b-9a35-fdd32b185730"; Var newID = "91e3cbe6-8168-40be-bf26 The code above was not successful. itemprop = "text"> Just use the string in your xml variable, JS xml.repla ce ('4900a2a9-47d7-4d3b-9a35-fdd32b185730', '91e3cbe6-8168-40be-bf26-ccdd6acb1e17'); ...

three.js - ShaderMaterial not repeating after updating uniform texture -

After updating my texture, there is a problem with my tiled image. The text I'm updating is the same What is this when I try to update, that is 256x256: I am currently using the latest version of three .js i.e. the irir. Version 68 with JS Update function: function testing () {mesh = scene.getObjectByName ("plain", true); Texturex = three. Image Utility. Load ("images / mosaic_tiles_lief_poton_201005060.jpg"); Trap material. Uniform DefUsConverter.value = Texturex; Shader code: mirror_shader = {Uniform: {"mirrorColor": {type: "c", value: new three. Color "," DiffuseSampler ": {type:" M4 ", value:" T ", value: zero}," mirrorcompler ": {type:" t ", value: zero}," texture matrix " The new three matrix 4 ()}, "Rickettex": {type: "i", value: 1}, "repeat": {type: "i", value: 1}}, vertex sha ader: ["uniform matte texture" ...

ios - How to allow only one cell to be clickable -

Image
I am trying to add a tick next to a user selection, to indicate that the user has a special Place is guessed at. Currently, my argument allows all the cells to be clicked as seen below; I have at one time How can I restrict the user to enable only one selection? I was thinking of a variable (to say) to track the currently selected - in this way I can tick the right places. However, I want to know 1) This is the best way to do this and 2) How can I deselect the previously selected cell? Thanks Do I need a class variable to see if it has been fixed, if so, log in something You can easily use: tableView.allowsMultipleSelection = false

How to get an url in a string with regex -

I am trying to use a regex to get a URL but I remember the end of the URL here An example of a string. Containing a URL & lt; div class = \ "ExternalClassC7001553FFC442DD9B99547999723C7B \" & gt; http: //bazar.flow.be/Knowledge/Legal/FR/Ina/Circul/Circul BB ed. 2014 / circ_bb_p_2014_xxx.doc & lt; / Div & gt; I want to get it into output: http://bazar.flow.be/ Knowledge / Legal / FR / Mirror / Caricul / Circul For now, I use this regex which returns me: "" @ "( (Https? | Ftp | file) \: // | www) [one-zA-Z0-9 \ \ -.] (/ [[One-zA-Z0-9 \ \ & amp; \ =; \ + '\ ((| https | | ftp | file) \: // | www.) [A-Za-z0-9 \.] - (/ [[A-Za-z0-9 \? \ & Amp; \ = \ \ \! \ \ (\) \ * \ - \ ._ ~%] *) * ([^ & lt;] +) * Try See it . Demo.

c# - clickonce using old user.config after upgrade -

I have a click application that has worked well for years. I recently made some changes to the application. This application used to be in its own solution, but I recently added it to another solution to it that it ultimately I will use some libraries in the solution. (But I have not actually made any changes in any reference so far.) I have updated the application from .NET 4.0 to .NET 4.5. I add two new settings. I did not pay attention correctly but it has changed how my app user manages settings before user settings have always been preserved during the upgrade. Now when I change settings , They will continue until I remove a new version, at that time all the settings will be back before returning these changes (and the new settings will be at default I did some excavations and found that there are folders for my (and other users) in C: \ user ... \ local \ application ... 3 versions. 1.0.0.0 1.9.8.114 1.10.4.0 The current version is 1.11.3.16 and it appea...