[Solved] how to send data from html form to php using ajax using upload also

function dataSubmit(formid){ //alert(formid); // $(‘.result’).html(‘<p style=”display:block; text-align:center;”><i class=”fa fa-refresh fa-spin fa-fw” aria-hidden=”true”></i><span class=”sr-only”>Process…</span> Processing</p>’); var action = $(formid).attr(‘action’); var fd = new FormData(); var file_data = $(‘input[type=”file”]’)[0].files; // for multiple files for(var i = 0;i<file_data.length;i++){ fd.append(“file_”+i, file_data[i]); } var other_data = $(‘form’).serializeArray(); $.each(other_data,function(key,input){ fd.append(input.name,input.value); }); $.ajax({ url: action, data: fd, contentType: false, processData: false, type: … Read more

[Solved] Moving files from one location to another with a wildcard file extension?

Assuming that the file names are in a file, one on each line, with no extension, this code might do it. When you are confident that the correct files will be moved, remove the -WhatIf from the Move-Item cmdlet. $names = Get-Content -Path ‘.\filelist.txt’ Get-ChildItem -File -Path ‘C:\the\directory’ | ForEach-Item { if ($names -contains $_.Name) … Read more

[Solved] WEMOS D1 + DallasTemperature: How to print temperature and temperature comparison in if [closed]

In this line: int insideThermometer = (int)insideThermometer; You create a local variable and assign it to itself. Not what you wanted. The global var you are trying to use is DeviceAddress insideThermometer = { 0x28, 0xFF, 0x83, 0x51, 0xB2, 0x17, 0x4, 0x8A }; If you look at the source code, DeviceAddress is typdef’d as typedef … Read more

[Solved] Not sure why If Statement is not working. (Pygame)

Surfaces doesn’t have an object for retrieving the file name, but maybe you could use another variable to hold the file name? #load images bg_filename = “start.png” background = pygame.image.load(bg_filename) #keep looping through while 1: #clear the screen before drawing it again screen.fill(0) #draw the screen elements screen.blit(background, (0,0)) #update the screen pygame.display.flip() #loop through … Read more

[Solved] Need to search for number combinations within textbox(c#)

Try this: string Input = “919982115672”; Console.Write(Search(Input)); public string Search(string Input) { Dictionary<string, string> PreDefinedSearchAndTexts = new Dictionary<string, string>(); PreDefinedSearchAndTexts.Add(“8211”, “Hello”); PreDefinedSearchAndTexts.Add(“82”, “My name is inigo montya”); PreDefinedSearchAndTexts.Add(“9821”, “You killed my father”); PreDefinedSearchAndTexts.Add(“5672”, “Prepare to die”); StringBuilder sb = new StringBuilder(); foreach(string Key in PreDefinedSearchAndTexts.Keys) { if(Input.Contains(Key)) { sb.Append(Key).Append(” : “).AppendLine(PreDefinedSearchAndTexts[Key]); } } return sb.ToString(); … Read more

[Solved] python 3 Acess file and check number of time phrase comes up [closed]

Assuming that the count result applies to the whole file you can use a collections.Counter: from collections import Counter with open(‘input.tsv’) as infile: counts = Counter(infile.read()) for c in ‘SF’: print ‘{}: {}’.format(c, counts.get(c)) This has the advantage of allowing you to obtain counts of any character (not just “S” and “F”) with one pass … Read more

[Solved] what code should i use ?? wordpress and css

It’s really not good practice to do this (override inline styles) and would be better that you can remove the inline styling from your html file, BUT you can do this by adding !important to the relevant css classes. So you could add the following to your external stylesheet #big-video-vid { top: new-value-here !important; left: … Read more

[Solved] First echo database row doesn’t show PHP [duplicate]

Replace the for loop with this: while($row=mysqli_fetch_array($result)){ echo “<td><strong>From:</strong>”.$row[“fra”].” <br><strong>To:</strong> “.$row[“til”].” <br><strong>Date:</strong> “.$row[“dato”].” <br><strong>Clock: </strong> “.$row[“klokkeslett”].”</td>”; echo “<td></td>”; echo “<td></td>”; } You are telling you program to keep looping through mysql_fetch_array($result) and assign the fetched record to $row. Also, do not forget to take out this line $countRows=mysqli_affected_rows($db); as you no longer need it. 1 … Read more

[Solved] Loop through ID starting with speciific string [closed]

You can do it with document.querySelectorAll() and with for loop like follows: var nodes = document.querySelectorAll(‘[id^=name_]’); for(var i = 0; i < nodes.length; i++) { console.log(nodes[i].innerHTML); } <div id=”name_a”>aaa</div> <div id=”name_b”>bbb</div> Please note: with nodes.forEach you will get an exeption “Uncaught TypeError: nodes.forEach is not a function” because nodes is a NodeList and not an … Read more

[Solved] X86 Intel Assembly Language Questions

Mul EBX multiplies the value in EAX with EBX. The lower 32 bits of the result are stored in EAX, the higher 32 bits of the result are stored in EDX. EAX will be 264 and EDX will be 0. Mul (+ 32bit register) multiplies EAX with the specified register, stores the the lower 32 … Read more