Quantcast
Channel: User Michael Banzon - Stack Overflow
Browsing latest articles
Browse All 37 View Live

Comment by Michael Banzon on Jekyll: Fenced code blocks with line numbers

Using redcarpet I start the blocks with the tripple "hyphen" (like here on SO and GitHub) with the language/syntax to use following (with no space). Anything I've tried to put after that haven't worked.

View Article



Comment by Michael Banzon on How to get the type of data from a URL

which one of the lines casts the exception?

View Article

Comment by Michael Banzon on With GNU Make, how can I combine multiple files...

I would "just" make a script that took the files as arguments and looped through them.

View Article

Comment by Michael Banzon on Unmarshall json into database json field for...

Yes. My initial comment stated that json.RawMessage should be cast to a string when it is in fact a type conversion ant not a cast.

View Article

Comment by Michael Banzon on Cross domain update hash on opener in Javascript

That would (just) cause the URL to be loaded in the parent frame, right? It would still be up to the parent to actually handle the request and load the wanted content in the iframe?

View Article


Comment by Michael Banzon on Could not found...

@CodeQuestor I've changed my reply to add some reasoning behind the initial removal.

View Article

Comment by Michael Banzon on Is this a good first project for my low Java...

This looks very much like the program I made when I started programming. If you like to get some basic programming skills I'd recommend you start with an interpreted language like Python or Ruby -...

View Article

Comment by Michael Banzon on Executing script that was dynamically injected

Have you tested your theory? You could add IDs to the script tags and look them up sequentially.

View Article


Comment by Michael Banzon on Golang abstract function that gets data from db...

If you are having performance issues I'd suggest you try profiling. This code isn't too long - try and make a version that uses reflection and see how fast that is. It is unclear what kind of database...

View Article


Comment by Michael Banzon on Global var in a called Go package

Can you be more specific with your question?

View Article

Comment by Michael Banzon on Changing React UI if API call is/isn't successful

Thanks @Sagivb.g and greto - the main problem using the redux store is that it isn't really a state I want to represent - it's more a change in state. I have an input field with a value/name that is to...

View Article

Answer by Michael Banzon for How to send email from a secure network with...

Normally a "secure network" means that there is a firewall in place that restricts the traffic and only allows communication on certain ports like port 80 and maybe 8080.Such networks (workplaces,...

View Article

Answer by Michael Banzon for Hashing a password PHP Login not working

In your login code you need to hash the input before you query the database. Insert the line:$pass = md5($pass);Before the $query = line.

View Article


Answer by Michael Banzon for Using dataSet.ReadXml when the server is...

Have you tried putting the linedataSet.ReadXml(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(read)));outside the do-while loop, and then having the while-clause only evaluate count:while (count...

View Article

Answer by Michael Banzon for Better Solution than Evernote for Code...

I use Evernote as the snippets etc. is primarily from various websites. The web clipper browser plugin lets me create notes right to Evernote with highlighting (as shown on the original website)...

View Article


Answer by Michael Banzon for .htaccess - redirect if site accessed in frame?

I believe the only option you have is to use JavaScript. The presence of a surrounding frame is a client side thing and therefore handling it properly would be limited to client side code.Keep in mind...

View Article

Answer by Michael Banzon for mailgun api calls to add a domain to mailgun...

The password you are settings with the smtp_password property is the new password for using SMTP with the new domain you specify.For debugging you could try to add the domain manually using cURL eg. to...

View Article


Answer by Michael Banzon for Problems decoding XML in go

You need to change the xml:"folders" meta to xml:"folders>folder" to match the folder elements inside the folders element.See this modified playground example.

View Article

Answer by Michael Banzon for Safely execute command (avoid remote execution)...

Generally magic functions like that are very hard to get right and often they will leave your application open to attacks if you rely heavily on them.I would recommend that you use a smart URL/request...

View Article

Answer by Michael Banzon for SMS sending permission on Active Android device

If you install the application via debugging/IDE/ADB it will automatically get the permissions you require in your manifest.So: Yes! When run on the device through the debugger, the application will be...

View Article

Answer by Michael Banzon for Android, Run application without emulator or any...

First: Consider fixing the problem with Windows recognizing your phone.Second: You can use the Android SDK to make an APK - you can then transfer it to the device the way you prefer (download from...

View Article


Answer by Michael Banzon for How to change specific part of a file using java?

Reading and writing files in specific formats is a little bit trickier that what you portray.Seen with "XML eyes" you are only changing a portion of the file - but to do that on the file level you need...

View Article


Answer by Michael Banzon for are multiple methods ok in an interface definition?

One approach would be to do it like the ReadWriter case in the standard library.Define one interface:type Commander interface { Command()}and the other:type Notifier interface { Notify()}and then the...

View Article

Answer by Michael Banzon for Mail API with ability to group messages to a...

I doubt that you will find any API/library with this functionality.Combining messages "in a reasonably intelligent manner" will prove to be virtually impossible for a library knowing absolutely nothing...

View Article

Answer by Michael Banzon for How to disable internet access for particular...

It depends if you are asking to control this in an app you are writing yourself or in a 3rd party app on your deviceFor 3rd party apps: Android 4.3 had a permission manager that allowed adjusting...

View Article


Answer by Michael Banzon for How can I point from a page a.html to another...

You need to use the anchor tag in a.html:<a name="profs"> ... </a>

View Article

Answer by Michael Banzon for How do I use arguments from the command line in...

You need to access the variables through os.Args after calling flag.Parse() or assign them to variables using the flag package.Check out this example on both:package mainimport ("fmt""os""flag")func...

View Article

Answer by Michael Banzon for Posting data as multipart/form-data the...

There is always the posibility to invoke the submit() of the form element (using jQuery here):$('#yourForm').submit();This will (of course) require that the endpoint targeted by the form handle the...

View Article

Answer by Michael Banzon for SQLite query doesn't work as expected

There is a little mess up in the creation - you shouldn't use auto_increment in the joining table:CREATE TABLE Exercise_Personal_List ( e_id_m int, p_id_m int);And the selection should be:select * from...

View Article



Answer by Michael Banzon for Extra margin showing below element?

You can use relative sizing on the first letter and set the line-height property to the relative height 100%, like this:p::first-letter { font-size: 200%; font-family: 'Special Elite',cursive;...

View Article

Answer by Michael Banzon for Content-Length header with HEAD requests?

The HTTP-spec at W3C states:If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, ...Which (to me) means it...

View Article

Answer by Michael Banzon for Newtonsoft JSON Deserialize

You can implement a class that holds the fields you have in your JSONclass MyData{ public string t; public bool a; public object[] data; public string[][] type;}and then use the generic version of...

View Article

Answer by Michael Banzon for Could not found...

Sorry to cause this trouble.I've found the old code and restored the repository (I don't have the original commits/history so a single commit of the latest state must do).I hope this helps.I initially...

View Article


Answer by Michael Banzon for Place holder for `Textarea` not working in...

Placeholder text is only shown when there is no content in the input component.The <textarea> element you have is not empty - there is whitespace between the start and ending tags.The fix is to...

View Article

Answer by Michael Banzon for Store file in executable binary

One way to do this is to use go-bindata - this will add an extra compile step when your binary files change.

View Article

Jekyll: Fenced code blocks with line numbers

I'm trying to add line numbers to fenced code blocks in markdown with Jekyll.I have tried using both kramdown and redcarpet and adding line_numbers: true to the _config.yml file (under the proper...

View Article


Answer by Michael Banzon for Including template/html files in your go binary

Historically there was no standard way to do this in Go. This answer is preserved for historical reasons. See below for updated answer.--As comments show there is a few libraries available that will...

View Article

Browsing latest articles
Browse All 37 View Live




Latest Images