hello
i have an char** arr which is an array of strings and i want to erase the 2 last cell of the array or maybe to create a new char** but without those last 2 cells
thank you very much.
I have a string of the form "a-b""c-d""e-f"...
Using preg_match, how could I extract them and get an array as:
Array
(
[0] =>a-b
[1] =>c-d
[2] =>e-f
...
[n-times] =>xx-zz
)
Thanks
I have 1 NSMutableArray and I want to convert whatever data in array will be in NSString.
tell me code for that. Array is nothing but object of NSMutableArray class.
In C++ I would just take a pointer (or reference) to arr[idx].
In Scala I find myself creating this class to emulate a pointer semantic.
class SetTo (val arr : Array[Double], val idx : Int) {
def apply (d : Double) { arr(idx) = d }
}
Isn't there a simpler way?
Doesn't Array class have a method to return some kind of reference to a particular field?
How to make the use of hidden variables as array for consecutive submission of data so that they can be used to display the records list.
I have a form with 4 text fields and a file upload field.. as i submit he form it should get appended to the list which needs to be displayed below the form, such that these values are NOT stored in the DB..
So in this case how can i use the post array to collect the data and display in the list below?
Is there any fast method to make a transposition of a rectangular 2D matrix in Python (non-involving any library import).? Say, if I have an array X=[[1,2,3], [4,5,6]] I need an array Y which should be a transposed version of X, so Y=[[1,4],[2,5],[3,6]].
When I learned Java, I was told that the arraylist works this way:
It creates an array with room for 10 elements.
When the 11th element is added, it is created a new list with room for 20 elements, and the 10 elements are copied into the new array. This will repeat as until there are no more elements to add, or to a maximum size.
Is the List in .NET constructed the same way?
Hi,
Can anyone help me please?
I have to find the row number from 1 selected array which I stored in one separate array and randomly I'm trying to get the row number from datagridview
http://serv8.enterupload.com/i/00246/aewglahmvpr5.jpg
In other words:
if I know a column value for a given row in a datagridview (e.g. for this row, FirstName == 'Bud'), how can I get the row ID?
Suppose you have a string: "SELECT * FROM TABLE WHERE column1 = :var1 AND column2 = :var2"
Now, how do I get an array with all the variables like so:
Array
(
[0] => :var1
[1] => :var2
)
I've tried it with PHP's preg_match_all, but I struggle with the regex.
$varcount = preg_match_all("/ :.+ /", $sql, $out);
I want to set a route :requirements on an array that verifies a particular parameter is included in an array:
atypes = [:culture, :personality, :communication]
map.with_options(:path_prefix = ':atype',
:requirements = {:atype = atypes.include?(:atype)}) do |assessment|
...
end
I haven't been able to find any documentation on how to accomplish this. Any help would be appreciated.
I'm wanting to use http_build_query to change an array to html tag properties. Problem is, it's changing my single-quoted values into %27. So if I have
http_build_query( array("type"=>"'hidden'", ... ), '', ' ' );
I get
<input type=%27hidden%27 ...>
How can I get around this?
Hi
having an issue using a NSMutableArray;
In my implementation file applicationDidFinishLaunching method I have
_imgArray = [NSMutableArray array];
and _imgArray is defined in my .h file as
NSMutableArray *_imgArray;
After populating it, it traces out correctly.
The problem is, in another method in my implementation file, I can't seem to acces the _imgArray array.
It traces out to
_imgArray= ar.lproj
What gives?
Does Doctrine 1.2 support importing indexes with Doctrine_Core::generateModelsFromDb() function?
I need to make a migration between 2 database connections, one of them having unique index on 2 fields and one doesn't. And my migration is empty. It looks like Doctrine doesn't support indexes when importing from databae, other than those tied to relationship foreign keys.
$changes = Doctrine_Core::generateMigrationsFromDiff($migrationsPath,
array('doctrineOld'),
array('doctrine'));
Got a problem,
I have an an array of objects inside a constructor of a class. I'm trying to use the array to relate to a property in the object but I can't relate to them.
lessonObjectsArray(0) = lessonObject1
lessonObjectsArray(1) = lessonObject2
lessonObjectsArray(2) = lessonObject3
the properties of the object "lessonObject1" are lessonName, videoLink, pdfLink
I thought it would be tbTest.text = lessonObjectsArray(0).lessonObject1.lessonName
just doesnt work
Hi,
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my @array = qw[a b c];
6 foreach my($a,$b,$c) (@array) {
7 print "$a , $b , $c\n";
8 }
I receive following error: Missing $ on loop variable
What is wrong?
I am using: perl v5.10.1 (*) built for x86_64-linux-thread-multi
I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array?
Basically if someone answered this question I think all my questions would be answered:
If I had 100 randomly generated numbers (as keys), how would I implement a hash table and why would that be advantageous over an array?
Psuedo-code or Java would be appreciated as a learning tool...
Hi there,
What's the difference between using the two options below to output link HTML?
theme('links', $primary_links, array('class' => 'links primary-links'))
theme_links($primary_links, $attributes = array('class' => 'links primary-links'))
Many thanks
In Javascript, if an object has lots of properties that are functions:
var obj = { foo: function() { ... },
bar: function() { ... },
...
}
then how can you get an array of names of those functions? That is, an array
["foo", "bar", ... ]
thanks.
I have 1 NSMutableArray and I want to convert whatever data in array will be in NSString.
tell me code for that. Array is nothing but object of NSMutableArray class.
I have an array...and I need to exclude all the items in this array of string from the masterList.customField as shown below
string[] excludeItem = {"a","b","c"};
CustomDTO[] masterList = service.LoadMasterList();
masterList.Where(c=> masterList.customField NOT IN excludeItem
How do I achieve the NOT IN part above?
{"paging": {"pageNum":2,"action":"Next","type":"","availableCacheName":"getAllFunds","selectedCacheName":"","showFrom":101,"showTo":200,"totalRec":289,"pageSize":100},
"Data":[{"sourceCodeId":0,"radio_fund":"individua
l","availableFunds":[],"fundId":288,"searchName":[],"fundName":"Asian Equity Fund A Class Income","srcFundGrpId":"PGI","firstElement":0,"las
tElement":0,"totalElements":0,"pageList":[],"standardExtract":true}]
I have json file with above format with two fileds,one paging and one is Data array.
I able to retrieve values of paging,but i am not able to retrieve the values of data array with .each function of jquery.
Any suggestions or inputs really appreciated.
a file contains
a: b
d: e
f: a:b:c
g: a
b
c
d
f:g:h
h: d
d:dd:d
f
How to parse this file into lethand side values into one array and right hand side to another array . i tried with split . but i am not able to get it back
I was wondering if the foreach statement in perl iterates the items in an array in consistent order ? That is, do I get different results if I use foreach multiple times on the same array or list ?
Thanks.
Per the documentation, String.Format will throw a FormatException if either (A) the format string is invalid or (B) the format string contains an index that cannot be found in the args array.
I want to be able to determine which (if either) of those conditions fail on any arbitrary string and array of arguments.
Is there anything that can do that for me? Thanks!
Below I have some jQuery that runs through each table with the classname = sizetable
I would like to execute this:
$("#frontshade :radio").click(function() {});
But I'm not sure how to replace the "#frontshade" with the id from the array
var table_ids = new Array();
$('.sizetable')
.each(function(e){
table_ids[] = $(this).attr('id');
// JQUERY TO EXECUTE ON EACH TABLE
$("#frontshade :radio").click(function() {};
//
});
Thanks in advance for any answers