I have a 3x3 array that I'm trying to create a pointer to and I keep getting this array, what gives?
How do I have to define the pointer? I've tried every combination of [] and *.
Is it possible to do this?
int tempSec[3][3];
int* pTemp = tempSec;
...
I have a number of traceroutes that i need to compare against each other but i dont know the best way to do it, ive been told that hash maps are a good technique but i dont know how to implement them on my code.
so far i have:
FileInputStream fstream = new FileInputStream("traceroute.log");
// Get the object of DataInputStream
DataI...
Hello
There are 2 arrays, both with the same length and with the same keys:
$a1 = [1=>2000,65=>1354,103=>1787];
$a2 = [1=>'hello',65=>'hi',103=>'goodevening'];
asort($a1);
The keys of a1 and a2 are id's from a database.
a1 gets sorted by value. Once sorted, how can we use the same sorting order in a2?
Thanks!
...
Basically, I have multiple URL's stored in a MySQL table. I want to pull those URLs from the table and have cURL connect to all of them. Currently I've been storing the URL's in the local script, but I've added a new page that I can add and remove them from the database, and I'd like the page to reflect it appropriately.
Here is what I ...
trying to write an array to a text file, but it is failed, can anybody say, WHY?
$filename= 't12a';
for ($pnum = 1; $pnum <= 15; $pnum++){
$bbal = 3;
$ipmnt = 14 * 5;
$ppmnt = 26 - 7;
$ebal = 48 - 4;
$ccint = 54 + 45;
$cpmnt = 25 + 54...
I've read a lot about the core implementation of arrays in javascript and often I find that experimenting is the best way to learn,
Right now i have multiple forms where you can type in different things,
i want to be able to pull the value of each one and put it in an array so that i can later on read them in in a dynamically created di...
I'm looking for an elegant way to turn this array:
Array (
[foo] => 1
[bar] => 1
[zim] => 3
[dib] => 6
[gir] => 1
[gaz] => 3
)
Into this array:
Array (
[1] => Array ( foo, bar, gir ),
[3] => Array ( zim, gaz ),
[6] => Array ( dib )
)
Note:, there is no relationship between the keys or values. They are completely a...
I have a ListView control on my form set up like this in details mode:
What I would like to do, is get all the values of the data cells when the user presses the Delete booking button.
So using the above example, my array would be filled with this data:
values(0) = "asd"
values(1) = "BS1"
values(2) = "asd"
values(3) = "21/04/2010"
v...
Hello,
I have small class called 'Call' and I need to store these calls into a flat file. I've made another class called 'CallStorage' which contains an array where I put these calls into.
My problem is that I would like to store this array to disk so I could later read it back and get the calls from that array.
I've tried to achieve ...
Hi,
I installed the sml interpreter from here : http://www.smlnj.org/, I used the self extracting .EXE for windows. (I'm running windows7 64 bit)
Although simple operations on basic datatypes are working, it is not recognising operations on arrays/vectors (update, array constructor etc). Do i need to install something else as well to ma...
I am trying to reorder an array (moving one item of 90 to the top, and move all the others down).
Is there a way to do this?
...
I have the following code.
$connect = new Connection ();
$response = $connect->putFile($fileName, $destination);
header("Location: /test.php?response=" . $response);
When I invoke header with the response, the file will stop execution, but I will have no error in the console... I am thinking maybe this array needs to be encoded for ...
I'm having a hard time describing what I'm looking for.
If we pretend that we're pulling an array (I've used the .split to get user input data)
where each line represents a link.
How can I then add an anchor tagg to that link that I'm pulling?
I need to be able to put
< a href=" + thearray + ">anything< /a>.
The reason for this is ...
The thing im trying to do right now is pulling in multiple links from a textarea,
We can pretend that a user inputs c:\pics\img01.jpg and in the next row he'll have the next imglink.
I want to pull those links, I allready have the code for that:
var entered = $('#filedir').val();
var lines = entered.split(/\r\n/);
var opttext = "...
Is there any way to replace titles faster then str_replace function? I've got a file that is 2000 lines of array changes. That hurts my webpage.
...
The following program replaces all spaces with %20.the compilation works fine but the program terminates during the runtime.Any help???
#include<iostream>
#include<string>
using namespace std;
void removeSpaces(string url){
int len=url.length();
int i,count=0;
while(i<=len){
if(url[i]==' ')
count++;
i++;
}
int length2=len+(count*2);
s...
I'm having some problem with passing a javascript array to the controller. I have several checkboxes on my View, when a checkbox is checked, its ID will be saved to an array and then I need to use that array in the controller. Here are the code:
VIEW:
<script type="text/javascript">
var selectedSearchUsers = new Array();
...
I have a large xml passed from grails to flex. When flex receives the xml, it converts the xml into an associative array object. Given the large xml file, it takes too long to complete the loop, is there any way in flex to make conversion faster? Below is my sample code.
<xml>
<car>
<model>Vios</model>
<type>Sedan</type>...
The following code (copied from a question from about a year ago) works fine under Scala 2.7.7, but does not behave correctly under Scala 2.8.0 (Beta 1, RC8).
import scala.xml
class Person(name : String, age : Int) {
def toXml(): xml.Elem =
<person><name>{ name }</name><age>{ age }</age></person>
}
def peopleToXml(people: ...
updated:
i use this:
$.getimagesarr = function(operation) {
return $.ajax({
type: 'POST',
url: 'operations.php',
data: {'operation':operation},
async: false
}).responseText
}
var jsonstring = $.getimagesarr('getimg');
var data = (new Function("return " + jsonstring))()
if (data){
....
}
old:
i want ...