C: differences between char pointer and array [duplicate]

C: differences between char pointer and array [duplicate]

This question already has an answer here: Why do I get a segmentation fault when writing to a string initialized with “char *s” but not “char s[]”? 16 answers

Escaping HTML strings with jQuery

Escaping HTML strings with jQuery

Does anyone know of an easy way to escape HTML from strings in jQuery? I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks). I'm sure it's po

How can I develop for iPhone using a Windows development machine?

How can I develop for iPhone using a Windows development machine?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although

Eclipse hangs on startup [duplicate]

Eclipse hangs on startup [duplicate]

This question already has an answer here: How do I prevent Eclipse from hanging on startup? 33 answers I have problem with running my Eclipse. I tried

“Starting emulator for AVD” then Panic: could not open…\"

“Starting emulator for AVD” then Panic: could not open…\"

I'm new to android app dev. When I created a new AVD, when I click start on this AVD: I get the following: Starting emulator for AVD 'Nexus_4_16_AVD'PANIC: Could not open: Nexus_4_16_AVD 1:This is a bug in the ADT Plugin. For a workaroun

idioms for returning multiple values in shell scripting

idioms for returning multiple values in shell scripting

Are there any idioms for returning multiple values from a bash function within a script?http://tldp.org/LDP/abs/html/assortedtips.html describes how to echo multiple values and process the results (e.g., example 35-17), but that gets tricky

ack-grep: chars escaping

ack-grep: chars escaping

My goal is to find all "" occurrences with ack. How can I do that?ack "Doesn't work. Please tell me how can I fix escaping here? 1:Since ack uses Perl regular expressions, your problem stems from the fact that in Perl RegEx language, ? i

How can I scp a file with a colon in the file name?

How can I scp a file with a colon in the file name?

I'm trying to copy a file using scp in bash with a colon (:) character in the source filename. The obfuscated version of my command I'm using is:scp file\:\ name.mp4 [email protected]:"/path/to/dest"I get this error:ssh: Could not resolve hostname

Why is null not allowed for DateTime in C#?

Why is null not allowed for DateTime in C#?

Why it is not allowed to assign null to a DateTime in C#? How has this been implemented? And can this feature be used to make your own classes non-nullable?Example:string stringTest = null; // OkayDateTime dateTimeTest = null; // Compile er

glob exclude pattern

glob exclude pattern

I have a directory with a bunch of files inside: eee2314, asd3442 ... and eph.I want to exclude all files that start with eph with the glob function.How can I do it? 1:You can't exclude patterns with the glob function, globs only allow f

VBA Object Model reference documentation

VBA Object Model reference documentation

Is there a place where I can simply find the Object Model hierarchy and kind of API for VBA for Excel 2013?I am looking at MSDN URLhttp://msdn.microsoft.com/en-us/library/office/ff841127(v=office.15).aspxBut that seems confusing.Example:If

Do not serialize Entity Framework class references in JSON (ServiceStack.Text library)

Do not serialize Entity Framework class references in JSON (ServiceStack.Text library)

As most of the people I've also ran into a problem of circular reference error when serializing (terrible) EF objects to JSON. Doing db.Detach(efObject) helps - but I still get garbage like "EntityKey" outputted.So I was wondering if there

Add raster image to HDF5 file using h5py

Add raster image to HDF5 file using h5py

I apologize if this is sort of a newbie question, but I am fairly new to Python and HDF5. I am using h5py, numpy, and Python 2.7. I have data from various files that need to be imported into one HDF5 file. The data from each file is to b

Why emacsclient can't find socket after executing 'emacs --daemon'

Why emacsclient can't find socket after executing 'emacs --daemon'

It is so confusing that emacsclient said it can't find socket just after executing emacs --daemon in bash:$ ps aux | grep emacsshiangro 1744 0.0 0.0 2432784 604 s000 S+ 1:03下午 0:00.00 grep emacs$ /usr/local/bin/emacs --

How do I allow CTRL-V (Paste) on a Winforms Textbox?

How do I allow CTRL-V (Paste) on a Winforms Textbox?

I have several textboxes on a windows form.I can't paste text into any of them using CTRL-V, though I can still right click and select paste. This is pretty annoying.I have tried this with the form's KeyPreview as both true and false. Text

Ng-init via function

Ng-init via function

As you know, it is possible to initialize objects as follows:Is it possible to define object similar like this but via a function:My aim is actually taking the objects from an API and show them in a list via ng-repeat 1:The documentation

How to Line Break or new line in XAML

How to Line Break or new line in XAML

I am having hard time to match Special characters set in XAML. I only on the following:To represent a LineBreak in XAML hyperlink button:use : > lineBreak or Hope this helps.Addendum: You can do this stuff in basically anyt

Symfony2 Assetic get asset urls from inside controller, not template

Symfony2 Assetic get asset urls from inside controller, not template

I want to include the url to one of the assets in my bundle in the controller, not in the template. More specifically, but not very important: I make a HighChart chart using obHighChartsBundle, and I have to plot some special icons in some

What is the status of Right To Left languages on Android?

What is the status of Right To Left languages on Android?

I need to create an application that has strings of many languages, including RTL (right-to-left ) languages. I want to know what is the current status of RTL (Right To Left) support on Android (even on latest API), for example:is it possib

How to set ID using javascript? [closed]

How to set ID using javascript? [closed]

I'm generating a page with lot of product, and for this, i need lot of ID, and i did it using a server side (Python) so i send for every product its own test Now because the user will dinamycaly set a value and see the result in the brows

What does (interactive) mean in an Emacs Lisp function?

What does (interactive) mean in an Emacs Lisp function?

Emacs Lisp function often start like this:(lambda () (interactive) ...What does "(interactive)" do? 1:Just to clarify (it is in the quoted docs that Charlie cites) (interactive) is not just for key-bound functions, but for any function.

Pure virtual functions in C++11

Pure virtual functions in C++11

In C++98, the null pointer was represented by the literal 0 (or in fact any constant expression whose value was zero). In C++11, we prefer nullptr instead. But this doesn't work for pure virtual functions:struct X{ virtual void foo() = n

Accessing Delphi DLL throwing ocasional exception

Accessing Delphi DLL throwing ocasional exception

When I'm calling a Dll method it sometimes throws an exception, and sometimes doesn't.I'm calling it like this:public class DllTest{ [DllImport(@"MyDll.dll")] public extern static string MyMethod(string someStringParam);}class Program

Importing scipy breaks multiprocessing support in Python

Importing scipy breaks multiprocessing support in Python

I am running into a bizarre problem that I can't explain. I'm hoping someone out there can help please!I'm running Python 2.7.3 and Scipy v0.14.0 and am trying to implement some very simple multiprocessor algorithms to speeds up my code us

Get first lines of Wikipedia Article

Get first lines of Wikipedia Article

I got a Wikipedia-Article and I want to fetch the first z lines (or the first x chars, or the first y words, doesn't matter) from the article. The problem: I can get either the source Wiki-Text (via API) or the parsed HTML (via direct HTTP-