syntax

PHP mkdir not working as expected

I’m working on some PHP that will create a folder every time a request is made to my server. I can’t seem to get my syntax proper. If I just used the $date variable it works no problem, however when I add the “clean” folder before it, it won’t create the folder. <?php $time = $_SERVER[‘REQUEST_TIME’]; $date = date(Ymd_Hms, $time);…
Read more

Convert a List to LinkedList C# [on hold]

One of my client librarys returns data as a list. The app that I am creating requires the data to be as a linked list. When I try to convert using the below syntax, though, I get an error. var listData = clientLibrary.getDataInList(someParameter); myapp.linkedListData = new LinkedList <CustomClass> (listData); The syntax error is on the second line of code cannot…
Read more

Scheme: What type is read?

When I read from user input from the console in scheme, what is the type that I need to use if i’m converting from that type into something I want? For example (string->number “20”) converts the string into a number, what is the syntax for this regarding a read? FOR EXAMPLE (define input(read) (let ((r read)) (????->number r))) Source:…
Read more

Issues after update to XCode 7: no drag and drop, no syntax coloring

I wrote a little app in Xcode 6 and updated now to Xcode 7. Now there is no syntax coloring and I cannot drag and drop any Storyboard-elements into the view controller any more. And the autocompiling isn’t working, so I can write massive syntax failures without getting a red dot on the left side. I restarted Xcode several times….
Read more

Syntax Error using Graphics

I am using the below code to merge two PNGs together although I get a syntax error on both the lines which start with g.drawImage. This is coming from an example at Merging two images but I can not comment on it because I just signed up here. package imageEditor; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; public class…
Read more

Passing named arguments and variable number of arguments in block call

I have a piece of test code: def asdf(id: nil, field: nil, state: nil) puts “id: #{id}, field: #{field}” end def test(a, b, *args) # a, b are needed only inside #test yield(state: :created, *args) end test(‘a’, ‘b’, id: ‘xyz’, field: :asd) { |*args| asdf(*args) } It generates a syntax error: syntax error, unexpected * yield(state: :created, *args) What is…
Read more