Posts

Upper or Lower Case Issue using get_file_contents php -

I am using a PHP GET method to get a filename that is placed in the get_file_contents command. If this is possible, then I want to ignore the letter case so that my URL is cleaner. For example, example.com/file.php?n=File-Name will work, but example.com/file.php?n=file-name does not work using the code given below Will do I think it should be easy, but I'm dry. any idea? $ file = $ _GET ['n']; $ File_content = file_get_contents ($ file); shorten all your file names and use: file_get_contents (strtolower ($ file)); (I hope you know about some people involved in using this.)

loops - How do i remove NULL input in C? -

My teacher told me address me "idiot proof of abuse of any kind", so I have a program that Here is the United Kingdom's foolproofed code # include & lt; Stdio.h & gt; # Include & lt; Conio.h & gt; Int main () {four lessons [16]; Printf ("type something:"); Fgets (text, 16, stdin); Printf ("You typed:% s", text); getch (); } I made some simple adjustments to make sure there is no error, however, if I can not get the filter to work properly, because it's still zero Allows input #include & lt; Stdio.h & gt; # Include & lt; Conio.h & gt; Int main () {four lessons [16]; Int loop; Do {printf ("Type something:"); Fgets (text, 16, stdin); If (text [0] == '\ 0') {printf ("try again"); System ("cls"); Loop = 1; } Else {loop = -1; }} While (loop> 0); Printf ("You typed:% s", text); getch (); } I have tried Google and I can not find a solid answer, it is probab...

java - How to override the defaults provided by SPRING BOOT Autoconfiguration -

After I have some knowledge of Spring 2.5 development and Java, but I know more about boot and data including modern spring. I'm trying to I am looking at the project: I have been working on this example on my machine, but I want to override some aspects of the example. For example, I want to specify my own Mongo database server and name to use in the project. It seems that the thing to do is to specify a new bean Mongo data source to make, but I'm not sure how to do this in this case import com.mongodb.Mongo Import com.mongodb.MongoClient; Import example.person.Person; Import example.person.PersonRepository; Import example.treasure.Treasure; Import example.treasure.TreasureRepository; Import org.slf4j.Logger; Import org.slf4j.LoggerFactory; Import organization Source: Import org.springframework.boot.SpringApplication; Import org.springframework.boot.autoconfigure.EnableAutoConfiguration; Import org.springframework.boot.context.properties.ConfigurationProperties; Imp...

search - Elasticsearch term suggester return stemmed results -

Why are elasticsearch term advisory results stemmed? When I do this query: curl -XPOST 'localhost: 9200 / post / _suggest' -d '{"my-suggestion": {"text": "manager", "word" The expected result should be "manager", but I get "manag" back: Code: {"" "": "," successful ": 5," failed ": 0}," mine-suggestion -1 ": [{" text ":" mang "," offset ": 0," 0.75 , "Freq": 180}, {"text": "money", "score": 0.75, "freq": [6] "options": [{"text": "manag", "score": 6} ]}}}} edit I found a solution to my problem: I Added a standard analyzer to the query. "Maler", "word": {"analyzer": curl -XPOST 'localhost: 9200 / post / _ notice' -d '{"my -suggestion ": {" text "" stand...

xcode6 - IPhone 6 plus simulator scaling -

Image
Even after scaling the iPhone 6 Plus Simulator up to 50% (there is no option to scale this less than this), Size is still bigger, how can I reduce it to 25% or less to work with it? writes the default ~ / library / p / You can have "0.4" different for your choice. Then, in the simulator, hardware-> Tools & gt; IPhone 6 Plus

python - Inputting textfile into list of class objects, then output the list contents -

As part of my existing project, I am trying to load the content of the text object into the list of objects Then the produce of the goods on a cursory look, my instructor said that my code looks ok, but there is no output. I press enter, and ... nothing. This "not loaded" code is also not printing. It only indicates a new input like I did not enter any direction, I do not know that the objects are being loaded properly in the list, and I am thinking that they are not. I am using only the Windows console to run it, so debugging is limited and slower. I'm new to Python, but this is not Python course, this is algorithm. But it is necessary that our projects will be written in Python, so I am learning that I will go. I have learned the code I have learned in C, C ++, or Java, usually from here and my instructor has given me some useful tutorials. I have searched here, but I think I have a lot of code. is. So, I ask you very clever people ... What am I missing here? Di...

css - double for loop in stylus preprocessor -

I'm new to the stylus and I want to iterate for two ends using the stylus preprocessor. This is what I have tried, but definitely not working. .mask: nth-child (1) :: after {top: 0; Left: 0; Height: 20; Width: 20; } .Masque: nth-child (2) :: After {Top: 20; Left: 20; Height: 20; Width: 20; } .Masque: nth-child (3) :: After {Top: 40; Left: 40; Height: 20; Width: 20; } .Masque: nth-child (4) :: After {Top: 60; Left: 60; Height: 20; Width: 20; } .Masque: nth-child (5) :: After {Top: 80; Left: 80; Height: 20; Width: 20; } .Masque: nth-child (6) :: After {Top: 20; Left: 0; Height: 20; Width: 20; } and the code continues till 25. The idea is that the grid was displayed (5 x 5 divis), 25 five squares for full in the mask position (0..24) .mask: nth-child ({ I}): For J. (0..4) Top 20 * j 20 * j height 20 * j width 20 * j How can I get it? If the above code is a way to get you, then there is a way to get it: / P> . Mascase status: i for absolute, j (1 .25) & amp;...