Export of the struture of the same table with PhpMyAdmin: `DROP TABLE IF EXISTS `test_apprentis`; CREATE TABLE IF NOT EXISTS `test_apprentis` ( `a_id` smallint(10) NOT NULL, `a_promo_id` smallint(11) NOT NULL, `a_cursus` smallint(10) DEFAULT NULL ) ENGINE=MyISAM AUTO_INCREMENT=3665 DEFAULT CHARSET=utf8;` Export with mysqldump: DROP TABLE IF EXISTS `test_apprentis`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `test_apprentis` ( `a_id` smallint(10) NOT NULL AUTO_INCREMENT, `a_promo_id` smallint(11) NOT NULL, `a_cursus` smal
I have two spring application contexts. One is local to my application and the other is from one of the maven dependencies. Now, my applicationContext.xml file look like this. <import resource="classpath*:**/sample-applicationContext.xml" /> and I have <context:component-scan> in the sample-applicationContext.xml file which scans for components. and Now, when I do the following.. ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml"); MyClass m=ctx.getBean(MyClass.class); Unfortunately, when I get the MyClass object, the object is created however, I see that depend
I have a INSERT + SELECT statement. One column is a VARCHAR but must be filled with a date with 'yyyyMMdd' format in 3 different dialect. With SQL server and Oracle there's no problem, but in Db2 I didn't find anything to do this stuff. In SQLServer is CONVERT(VARCHAR,S.DT_NASCITA,112) In Oracle is TO_CHAR(S.DT_NASCITA,'YYYYMMDD') Any1 can help me pls ? ty in advice !
One of our partner sites has a webpage with a form where I enter 2-3 number fields, a captcha and then submit the form. It opens a pop-up showing the requested details. The pop-up url is something like this https://abc.co/xyz/gef/sample/certificate?Values=123456789|2011|A1563894a|y6zs8v|'1373550','4148114' This thing works fine only in IE. The same process doesn't work in Chrome or Firefox, because the ' in the url is encoded to something like this https://abc.co/xyz/gef/sample/certificate?Values=123456789|2011|A1563894a|y6zs8v|%271373550%27,%274148114%27 I am shown an error We are unable to p
We need to open a Chart.cshtml page as a modal popup (gray parent window) in our application in center of a parent screen with some values as a input of popup. On popup closing we return some values to parent screen. Chart.cshtml directory is Views => Home => Chart.cshtml of my MVC application. Please help me with a sample code. Its really very helpful for me. Thanks, Sufyan
I have this JavaScript code for snow falling effect. It's working really nice, but I decided to create a snow falling on web page text. I have tried, but not getting how to do it. How to make snow fall on that "I love you" text? http://jsfiddle.net/DgrxX/22/ I have already seen in VB6 code where snow fall on text. If it is possible in Visual Basic 6 seven years ago, why not today in JavaScript or CSS3 or jQuery? function vp(woh) { var viewportwidth; var viewportheight; if (typeof window.innerWidth != 'undefined') { viewportwidth = window.innerWidth, viewportheight = window.innerHeight } else i
In R (thanks to magrittr) you can now perform operations with a more functional piping syntax via %>%. This means that instead of coding this: > as.Date("2014-01-01") > as.character((sqrt(12)^2) You could also do this: > "2014-01-01" %>% as.Date > 12 %>% sqrt %>% .^2 %>% as.character To me this is more readable and this extends to use cases beyond the dataframe. Does the python language have support for something similar?
I'm trying to make a snake in the console to keep me in training in c #. I have a problem in the movement. To test I wanted to do so by pressing the letter "a" would shift the "food" on the X I noticed that in terms of graphics, but does not move through a Console.Write is incremented. Can you give me a hand? I am attaching the main classes, world food Main: namespace Snake { class Program { static void Main(string[] args) { char s; World mondo = new World(20, 10); do { s = char.Parse(Console.ReadLine()); mondo.update(); mondo.drawWorld(); } while (s == 'a'); Console.ReadLine(); } } } World: n
I'm trying to git clone some repository, but then I get the error: $ git clone --recursive https://some-url.git Cloning into 'project'... fatal: unable to access 'https://https://some-url.git/': Unknown SSL protocol error in connection to some-url.git:443 I've read that the git repositories moved to force the TLS1.0 and no more support SSLv3 communication due to the POODLE vulnerability. But I don't know whether this error message means that my git client only knows to talk SSLv3 and the server denies or that the server only knows to talk SSLv3 and my client denies. If the problem is in my cli
Im somewhat beginner in bash scripting. I have here part of script that uploades files to sftp server. Then it shoud move files to other directory. Else echo info about no files in source_dir. Problem is that its not moving files and is looping back to sftp login after files are already uploaded. cd /dest_dir/ for file5 in *.test do if test -f $file5 then echo 'some text.' (( echo " cd /dest_dir/ lcd /source_dir/ mput *.test exit " ) | sftp "user"@"host") sleep 3 mv /source_dir/$file5 /source_dir/test/ else echo -e 'some text' fi
Is there any windows command which can be used with cmd prompt to check for disk space use. The report should be detailed in terms of sizes in GB i.e. list out folders with size greater than 1 Also, I wouldn't prefer to use any third party tool. There are restrictions of using any third party software in the particular machine. So a cmd line command would be the best solution.
I am having trouble copying and pasting the hyperlinks from one sheet to another using VB. I am using a database connection to pull the hyperlinks into Sheet1 and then using a macro to copy and paste the database data into another sheet, however the copy and pasting doesnt paste the "Clickable" link, only plain text. How do I go about copying a hyperlink using VB, is this even possible?? Sheets("Sheet1").Select Range("J19:K100").Select Application.CutCopyMode = False **Selection.SpecialCells(xlCellTypeVisible).Copy** Sheets("Sheet2").Select Range("C5:D100").Select ActiveSheet.Paste **Link:=Tru
I am working on a project which will later upload a few files to an FTP server after they are modified...I have everything but uploading the file figured out. I can successfully connect to the FTP server, but once the file goes to upload, the program hangs for a couple minutes, then it states that it timed out. java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at j
I'm trying to implement a message queueing system using a named pipe. To read from the pipe I've used: pump_read=1 while [[ ${pump_read} -eq 1]]; do IFS="|" read pump_f1 pump_f2 pump_f3 < queuefile echo "${pump_f1}|${pump_f1}|${pump_f3}" >> pump.log done To write to the named pipe I've used echo "x|y|z" | ssh user@host "cat > queuefile" I'm using this method because the reader and writers may not be on the same hosts. Mostly this works but reasonably frequently I will get rows in my log of "||" as though an empty line has been written into the pipe. I also have times when messages will disappe
I have a simple project but it is giving me headaches because Client-Side programming is not my thing. Basically I have a login page and the client wants me to prevent XSS attacks not allowing users not submit malicious code on username/password fields. I would do it on server side easily, but they do not want give to us access. Any chance to someone give me hints how can i do this? Even tough I know the basics of javascript/HTML, my experience is nearly null. I know that are several questions about this topic, but sincerely, I got lost with all information.
Finance applications demand an integer type due to security reasons. Rounding errors are not acceptable in that kind of application and can lead to exploits. Since JavaScript doesn't offer a proper Integer type, only IEEE 754 Doubles, how do you deal with monetary values in JavaScript, while keeping it safe?
I've gone through few posts and articles that discuss how to use powershell access usb drive like: Browse files on camera using PowerShell List all devices, partitions and volumes in Powershell https://superuser.com/a/377008/9546 But none of them actually "answers" the question. The last post shared also says no one has ever created an MTP solution because of certain limitations that MTP (protocol) itself has. One route I've taken kind of hit a wall; I don't know what to do next (with the wmi object). I've used the following vbscript program, and made note of the device id of the device I am i
I have created my first Android App which uses a QR code package (com.jwetherell.quick_response_code). The integration works good. However, when I deploy the application to the phone, not only the app icon is visible but also some android package icons which are useless without the app's functionality. In what way should I configure the deployment that only the app icon is visible?
I am trying to insert a form when a button is clicked but cannot find a way that does not make me put all of the HTML on one line with back slashes or many ugly lines of code. Something that does not include adding something like jQuery or PHP. How can I make this that is all on one line: <script> function newMsg() { document.getElementById("add_message").innerHTML = "<div class=\"message\">Add Message<br>Title: <input type=\"text\" id=\"title\"><br>Text: <input type=\"text\" id=\"message\"><br><br></div>"; } </script> Look more like this (that has good formatting and is on multiple lines): <s
Our application sends out emails using the new SmtpClient(smtpServer).Send(message); We are making sure that the smtpServer is valid, the message has To and From addresses, a subject and a body. If any of these are missing, we would log an exception before even attempting to send a message. But the application frequently fails with the below exception. Email Fail: System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: Too many invalid recipients. Now, please note that the email send functionality is not failing always. For the same "To" address, it fails, may be about hal
I'm styling a QComboBox in Qt. It is rounded how the figure shows. The problem is that is shows a strange square box behind the rounded border. Can someone tell me what this box is and how to make it invisible? By the way, I'd like to take the shadow away too. Here is my current code: QComboBox { border: 1px solid gray; border-radius: 10px; min-width: 6em; } QComboBox:on { border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; } QComboBox QAbstractItemView { border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; background: white; border: 1px solid gray; box-shadow: trans
We use mp4 files using the h264 codec on our server to play videos. The files in FF prior to FF35 worked fine, they work in IE8+, and Chrome. In FF35 we now get the following message in the console Media resource FILEPATH/FILENAME.mp4 could not be decoded. If we then load the resource directly we get Video can't be played because the file is corrupt. Is there something we have to do to the mp4 files to get them working in FF35? This behavior has been replicated on FF35 on OS 10.6.8-10.9, Windows 7, and Windows 8.
I have to convert some text and a small image into a PDF document on Android and for that I am using PdfDocument added in API 19. The thing with this is that the PDF generated by this one is about 3 times bigger (file size) than the one generated on iOS. Also, I tried to compress both Android and iOS PDF files with an online free compression tool and the results were: iOS: the compression couldn't do anything because was already compressed enough Android: the resulted PDF was the same as with the iOS one (about 3 times smaller) Even if I remove the image from the doc, the resulted Android PDF
a maven project ,when i want to ctreate a pdf ,happened this:com.lowagie.text.DocumentException: Font 'STSong-Light' with 'UniGB-UCS2-H' is not recognized.
From IEEE754, I read [...] every operation [...] shall be performed as if it first produced an intermediate result correct to infinite precision and with unbounded range, and then rounded that result [...]. My understanding is when dividing the double 1.0108552519184509e+76 (0x4FB6593CEBC97CC5) by 4.1777521369084075e+147 (0x5E94E917A9CC65DC), the theoretical intermediate fraction part is (binary) 1.0001000110011011000100110000110101001010110111101110100000000000001... and should get rounded to (rounding mode "nearest") 1.0001000110011011000100110000110101001010110111101111 resulting in a quoti
consider the following code: listLength <- sample(1:10, 1) vectorLength <- sample(1:10, 1) x <- vector("list") for(i in 1:listLength){ x[[i]] <- sample(1:10, vectorLength) } transform <- function(x){ result <- vector("list") for(i in seq_along(x[[1]])){ temp <- vector("numeric") for(j in seq_along(x)){ temp <- c(temp, x[[j]][i]) } result[[i]] <- temp } return(result) } and finally y <- transform(x) x is a list of random length , the vector elements of x have a random, but always equal length. The transform function returns a new list y, which is a list of vectorLength with vectors of listLengt
I'm going crazy trying to figure out a way to make a program that does not try every single combination. A simple example: I want to know if 11 can be generated by adding up numbers from the series (2,5,10,20), is there an easy way to do this without trying every single possibility? In this case we can do it with three 2s and one 5. Thanks
How to make a post request with GuzzleHttp( version 5.0 ). I am trying to do the following: $client = new \GuzzleHttp\Client(); $client->post( 'http://www.example.com/user/create', array( 'email' => '[email protected]', 'name' => 'Test user', 'password' => 'testpassword' ) ); But I am getting the error: PHP Fatal error: Uncaught exception 'InvalidArgumentException' with the message 'No method can handle the email config key'
I am currently doing a project in a fresh installation of Game Maker Studio, version 1.4.1499. When I attempt to build and run the project (using the run button, the run menu option, or by pressing F5), it comes up with the following output: Asset Compile finished: 11:07:49 AM ----------------------------------------------------------- executing C:\Users\User\AppData\Local\Temp\gm_ttt_64280\gm_ttt_91991\game.win ----------------------------------------------------------- "C:\Users\User\AppData\Roaming\GameMaker-Studio\Runner.exe" -game "C:\Users\Juggernaut\AppData\Local\Temp\gm_ttt_64280\gm_tt