<?php
class Lala {
const a = "a";
const b = a . "b";
}
?>
Parse error: syntax error, unexpected '(', expecting ',' or ';' on line 4
What's the problem with it?
I have an array of NSStrings:
Flower
Car
Tree
Cat
Shoe
Some of these strings have images associated with them; some don't. I can build an image name by appending .png to the name (e.g. Flower.png).
How do I check whether that image actually exists within the bundle before I try to load it into the view?
I am downlading the info.0.json file from xkcd and trying to parse just the alt text. I don't care if there are quotes around it or not. The problem it that the info.0.json file is all one line, and the alt text is in quotes after the word "alt=". Trying cat info.0.json | grep alt just returns the whole file (because it's all one line). What is the grep or sed code that will get me the alt text?
I'm trying to update body of all sms on Android device with
getContentResolver().update(Uri.parse("content://sms"), values.....
query but after request done, also updates message creation/received time.
How i can update message but leave old message date?
I have tried send to update query
ContentValues values = sms values oject;
values.put("body", updatedBody);
values.put("date", oldValues.getAsString("date"));
but it does not help.
In visual studio, when making a C++ windows application form. I want a picture to change when I click on it.
So when I double click the picture and it brings up the click action script, what script do I use.....
Similiar to
int temp = System::Int32::Parse(label1->Text);
temp++; label1->Text =
temp.ToString();
Which just increments an integer in a label
Hello, I'm going to develop gui-based application for tor controlling (like vidalia or torK). Are there any libraries for using tor? I don't want to parse each byte of information from sockets.
My program should display branches of computers, use chosen as traffic-provider etc.
What I need in my case? Are there any small and simple samples (for example open-source projects) to do this.
Hi, I am using the xpath in php5 to parse a xml document. The problem I have is writing a foreach to correctly display the following array
array(1) {
[0]=
object(SimpleXMLElement)#21 (2) {
["file"]=
string(12) "value 1"
["folder"]=
string(8) "value 2"
}
}
Ideally i would like to get the value by using $row['file'] or $row['folder']. Thanks for any help.
I want to create a program that will parse text for key words and make these words a certain color. What type of control supports many different colors? Would I have to create my own, or override the OnPaint() of a basic control or something? (Id like to avoid making my own control from scratch)
Thanks
Here is our dependency tree: BigApp - Child Apps - Libraries
ALL of our components are HEAVILY using one of the Libraries as above ( LibA).
But it has a ‘few’ public methods that require classes from ‘higher-level’ assemblies and we want to avoid CIRCULAR references.
What do you propose as a good design for this?
I have an IP address which I want to grab the last chunk of as an integer. So from "192.168.1.150" I'd get 150.
This is the code I'd concocted (I'm using C++/CLI), but somehow it feels rather clunky:
String^ ipString = "192.168.1.150";
int lastDot = ipString->LastIndexOf('.');
int lastSection = int::Parse(ipString->Substring(lastDot, ipString->Length-lastDot));
Is there a simpler way of doing this?
I want to parse a timestamp from a log file that has been written via
datetime.datetime.now().strftime('%Y%m%d%H%M%S')
and then compute the number of seconds that have passed since this timestamp.
I know I could do it with datetime.datetime.strptime to get back a datetime object and then compute a timedelta. Problem is, the strptime function has been introduced with Python 2.5 and I'm using Python2.4.4 (an upgrade is not possible in my context).
Any easy way to do this?
I have a page that comes back as an UnexpectedPage in HtmlUnit, the response is JSON. Can I use HTMLUnit to parse this or will I need an additional library?
I want to expand the Node only on click on Icon not on the label.
With yahoo ui 2.7 :
selfCategoryTree.tree.subscribe("labelClick", function(node) { alert(node.data.customData.id + " label was clicked"); });
So I catch the labelClick , I show an alert, but the Node is expanded.
I'm trying to get the HTML data of a website so that I can parse it. I have parsing bit sorted out but using the following code doesn't seem to work:
NSData *data = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString:@"http://thewebsite.net"]];
Is this the way I should be doing it or is there another way?
I have an existing pdf file which needs to be updated with information which varies with each client. There are around 50 clients. I have to update the pdf with these. How can I acheive the same in C#. The pdf has to be shown in the browser (only IE) Is there a third party dll which could be used, which would parse the pdf. Then write to the pdf.
I am trying to insert html into the HTML view.What i have done is to have tinymce advanced(a wordpress plugin) button that throws a popup and in it is all the necessary things to insert the html.The tinymce buttons are however only visible on the visual view.
Question 1:
Is it a plugin or hack that can allow one to parse html inside the visual view
Question 2:
Is it possible to insert html code to the html view from a popup initiated from the visual view
Hi,
I've been using notepad++ for a while now, but i noticed it doesn't have code snippets (i found quicktext plugin, but it doesn't work anymore), so i'd like to switch editor and my requirements would be:
Fast startup.
Code snippets.
Ability to use themes.
File tree view (or plugin, which does that).
What are you using?
Thank you all for suggestions!
Anyone know how to use Get-Member to Recursively dump to a text file The entire properties|methods tree of a COM object? (The Output formatting of Get-Object is fine)
Instead of giving me only the top level as in this example;
New-Object -com AutoItX3.Control | Get-Member
I need it to recurse the entire object to return results.
If This is not possible, how would I dump the methods/properties of a sub object?
If I have a cube divided into 8 smaller cubes, each of which may be subdivided into a further 8 cubes, ad infinitum, what is the name of my system?
I know that it's a special case of a tree, where each brance contains exactly 8 other leaves/branches.
I remember the name starting with "Oct", and there was a wikipedia article on it, but I honestly can't find it!
Does anyone know what such a data structure is actually known as?
To clearly separate the Controller and View layers, I do not longer want to pass full objects to my views. Instead I want to pass only arrays and objects that contain the data but do not have any methods. Otherwise a view script would be able to delete Doctrine records or traverse in the object tree to data that was not intended for the view.
If you have a C++ project that has a bunch of .ODL files and the generated .h files from the ODL compiler, should doxygen be told to parse both .odl and .h, or only one or the other? In general I don't like documenting generated code but IDL is sort of a special case.
In any case, it seems like the member listing of ODL files is not quite working properly in my tests, are ODL files properly parsed?
I'm getting datetime in JSON format as -
"\/Date(1261413600000+0530)\/"
From code behind, I'm using DataContractJsonSerializer.ReadObject method to deserialize data.
Converted data time is not correct.
How to parse correct JSON date time from code behind?
Basically I want to use the WPF Binding framework to "observe" a property in the data context, and when that value changes to call an event handler. I do not actually want to bind it to any target.
Sounds simple but from what I can see Binding is too coupled (to the visual tree and various other bits) to be able to use it flexibly.
Any thoughts?