I've read it's entry in the language reference (Intel's), but I cannot quite grasp what it does. Could someone in layman's terms explain it to me, what it means when it is included in a module ?
This question is similar in spirit to :
http://stackoverflow.com/questions/492178/links-between-personality-types-and-language-technology-preferences
But it is based specifically on indentation (spaces vs tabs and the number of spaces).
The reason I am asking here instead of searching is because I remember seeing a specific document writing about this. If I remember correctly, it also talked about why Linus prefers eight spaces.
This is a trend I've noticed. There is a very large adoption of ruby from the java community. Is it that c# is such an awesome language + having good tools over java that most c# developers aren't as keen to switching to ruby permanently as java developers are?
What are your opinions?
Hi All,
I am new to programming, and have been given many interviews for jobs, but what I lag is the concepts and skills of general problem solving not respect to any particular programming language.
are there any books or material available which can help me upgrade my programming skills.
looking forward for you guys to share your views.
Thanks a millions..
Kai
Assume you have a vector like so:
v <- c(1,1,1,2,2,2,2,1,1,3,3,3,3)
How can it be best reduced to a data.frame like this?
v.df <- data.frame(value=c(1,2,1,3),repetitions=c(3,4,2,4))
In a procedural language I might just iterate through a loop and build the data.frame as I go, but with a large dataset in R such an approach is inefficient. Any advice?
I've build my own WCF channel with all necessary stuff (like encoders, bindings, etc) to use it with ServiceHost.
I just want to build the "channel stack" making no custumizations at "Service Model". To acomplish this, my encoder returns perfect ServiceModel.Messages with a XML infoset just like other channel does.
Lets assume the following service implementation:
[ServiceContract(Namespace = "http://MyNS")]
public interface IService1
{
[OperationContract(IsOneWay = true)]
void dummy();
}
public class Service1 : IService1
{
public void dummy()
{
Console.WriteLine("In Service1:dummy()");
}
}
I used this service through other bindings and traced the following ServiceModel.Message contents (SOAP format):
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://MyNS/IService1/dummy</a:Action>
<a:To s:mustUnderstand="1">amqp://localhost</a:To>
</s:Header>
<s:Body>
<dummy xmlns="http://MyNS"></dummy>
</s:Body>
</s:Envelope>
Then (just to debug) i changed my encoder to allways return this message. When i use my custom channel the WCF's runtime replay with an faul message telling:
"The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree."
I read that the default EndPointDispatcher.AddressFilter simply looks to the "TO" header and delivery the message to corresponding service. This is happening with other bindings, why not happens with my custom channel too?
Is there any way to i check what default AddressFilter is doing?
Thanks
Hi to everyone,
I'm studying about programming language's theory and I can't figure out a solid reason to why lazy languages doesn't have mutation?
Does anyone know the reason?
Hi all,
I want to scrap some things from the following site: http://www.conrad.nl/modelspoor
This is my function:
public string SreenScrape(string urlBase, string urlPath)
{
CookieContainer cookieContainer = new CookieContainer();
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(urlBase + urlPath);
httpWebRequest.CookieContainer = cookieContainer;
httpWebRequest.UserAgent = "Mozilla/6.0 (Windows; U; Windows NT 7.0; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.9 (.NET CLR 3.5.30729)";
WebResponse webResponse = httpWebRequest.GetResponse();
string result = new System.IO.StreamReader(webResponse.GetResponseStream(), Encoding.Default).ReadToEnd();
webResponse.Close();
if (result.Contains("<frame src="))
{
Regex metaregex = new Regex("http:[a-z:/._0-9!?=A-Z&]*",RegexOptions.Multiline);
result = result.Replace("\r\n", "");
Match m = metaregex.Match(result);
string key = m.Groups[0].Value;
foreach (Match match in metaregex.Matches(result))
{
HttpWebRequest redirectHttpWebRequest = (HttpWebRequest)WebRequest.Create(key);
redirectHttpWebRequest.CookieContainer = cookieContainer;
webResponse = redirectHttpWebRequest.GetResponse();
string redirectResponse = new System.IO.StreamReader(webResponse.GetResponseStream(), Encoding.Default).ReadToEnd();
webResponse.Close();
return redirectResponse;
}
}
return result;
}
But when i do this i get a string with an error from the website that it use javascript.
Does anybody know how to fix this?
Kind regards Erwin
I'm trying to upgrade from JBoss 4.2.1 to JBoss 6. In JBoss 4.2.1, we are manually deploying our application as an exploded war and everything works beautifully.
I'm running into problems because the application that I am trying to deploy uses versions of 3rd party libraries that are older than the ones that JBoss 6 now includes by default. The result of this is that I'm getting classloader conflicts all over the place and the application won't even start.
At present, I have tried using the JBoss Classloading Documentation as well as the scanty bits of documentation for jboss-classloading.xml and haven't had any success.
Has anyone out there managed to do this successfully? If you have, how did you do it?
I've included a stack trace below in case it offers any useful information.
Caused by: java.lang.Error: Error visiting "/C:/jboss6/server/default/deploy/app.war/WEB-INF/lib/jaxb-xjc-2.1.12.jar/1.0/com/sun/codemodel/JConditional.class"
at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:268) [jboss-classloading-vfs.jar:2.2.0.Alpha9]
at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:407) [jboss-vfs.jar:3.0.0.CR5]
at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]
at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:395) [jboss-vfs.jar:3.0.0.CR5]
at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:102) [jboss-classloading-vfs.jar:2.2.0.Alpha9]
at org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule.visit(VFSDeploymentClassLoaderPolicyModule.java:181) [:2.2.0.Alpha8]
at org.jboss.scanning.plugins.DeploymentUnitScanner.scan(DeploymentUnitScanner.java:111) [:1.0.0.Alpha7]
at org.jboss.scanning.spi.helpers.UrlScanner.scan(UrlScanner.java:96) [:1.0.0.Alpha7]
at org.jboss.scanning.deployers.ScanningDeployer.deploy(ScanningDeployer.java:90) [:1.0.0.Alpha7]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]
... 41 more
I want to come up with a language syntax. I have read a bit about these three, and can't really see anything that one can do that another can't. Is there any reason to use one over another? Or is it just a matter of preference?
My development server is accessed by several OSX users, and their OS tends to leave lots of unnecessary files around the place, all starting with dot underscore ("._"). I know OSX can be told not to create these on network drives, but they still sneak in. I'd like SVN to ignore anything starting with "._", but I can't seem to get it to work, even though it looks like it should be simple. I've added "._*" to the SVN global ignore pattern, but SVN is still trying to add and commit these files. Can anyone tell me what I'm doing wrong? My full SVN ignore pattern is:
global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store Thumbs.db ._* *.bak *.tmp nbproject
I don't know if it makes any difference, but I'm trying to set this on both Ubuntu and Ubuntu server by editing the /etc/subversion/config file.
Could anyone please tell me which HTML/XHTML and CSS versions reached "Recommendation" (not "Candidate Recommendation") status?
I tried to find the documents at http://www.w3.org/TR/tr-status-stds
and they appear to be:
1) "XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)"
2) "Cascading Style Sheets (CSS1) Level 1 Specification"
Please correct me if I'm wrong. These are kinda neanderthal technologies...
Hello!
I'm developing a project that produces SVG files with custom embed fonts. SVG font definition I compose as SVG font tag with help of http://www.fontsquirrel.com/fontface/generator or Batik SVG Toolkit. The resulted SVG file I try to open in following applications:
Adobe Illustrator CS4 - text has default font and message noticed about font not found in system
CorelDRAW X5 - text has default font and any messages don't noticed
Batik SVG Browser (Squiggle) - renders text correctly
The problem is all modern typographies use CorelDRAW and Abode Illustrator for print vector graphic and them render not correctly SVG.
Solution
As for me, I see follow solutions:
Save the text with custom font as SVG path. This will work but, I can't find any solution that can convert text + TTF to SVG path data;
Use other vector format, f.e. AI, EPS or CDR. This solution is difficult for me, because I use SVG paths as part of input data;
Recommend our users to use Batik SVG Browser (Squiggle) or any other application which are based on Batik SVG Toolkit library. Batik SVG Toolkit requires Java runtime :(
If anyone know some knowledge to open SVG embed fonts in Adobe Illustrator or CorelDRAW please share them. I would be grateful for any help.
Thank you.
-Viktor Burdeinyi
I'm developing a project with two different sites, divided by
language. Maybe I was terribly wrong, but now my directory structure
looks like:
/ruapp/settings.py # SITE_ID = 1
/ruapp/manage.py
/enapp/settings.py # SITE_ID = 2
/enapp/manage.py
/common/urls.py
/common/ # almost every other file
/common/templates/ # templates with {% trans %}
/locale/ # with locales ru-ru and en-us, generated by calling
makemessages from the root of all this structure
How to tell django about the locale? It does not seem like it will
find the /locale/ folder by itself
I'm using a game physics library (Box2D) which only supports convex polygon shapes. However, I'd like the level builder to be able to just specify concave polygons without having to worry about that.
So, how can I automatically break apart a concave polygon into convex ones (or even all triangles).
Speed would be cool, but ease of implementation is more important. The breaking apart will only be done on game initialization.
(My language is Flash/ActionScript 3, but that shouldn't matter)
If a friend of yours wanted to get into development and didn't have any experience, what would you suggest? What language/resources would you suggest to break into programming? With all of the technologies out right now and buzz words where should one even start explaining this stuff to people?
I just started studying Python using the Python 3.2 Tutorial and on the introduction is written:
By the way, the language is named after the BBC show “Monty Python’s Flying Circus” and has nothing to do with reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged!
But I have to say that I did not understood this part: “Monty Python’s Flying Circus”, I'm Brazilian and even Google Translator don't know how to answer it. Can someone explain me this phrase?
i need to automatically change the RadDatePicker from normal calendar to Hijri. the idea is that i need to show a hijri calendar if the users's browser language is set to arabic.
i was able to do this when using a normal calendar but not with telerik RadDatePicker.
any ideas?
Greeting,
I'm a C# programmer guy. I'm planning to start developing app for iphone but I'm not sure if I should use C# under MonoTouch or just use the native language for iphone OS Objective C.
Is there a different to program for iphone app using C# or Objective C?
Is there limitation using C# to program app for iphone or it can do as much as Objective C can do to develop iphone app?
After updating to Parsec 3.1 from 2.x, code using many1, such as word = many1 letter fails with
No instance for (Stream s m Char) arising from a use of `letter'
I found a mailing list post claiming that adding {-#LANGUAGE NoMonomorphismRestriction #-} to the top of the source file would solve the problem, but it did not.
The short question is: if I hg rollback, how does Peter get my rolled back version if he cloned from me? What are the exact steps he or me has to do or type?
This is related to http://stackoverflow.com/questions/3034793/in-mercurial-when-peter-hg-clone-me-and-i-commit-and-he-pull-and-update-he-g
The details:
After the following steps, Mary has 7 and Peter has 11. My repository is 7
What are the exact steps Peter or me has to do or type SO THAT PETER GETS 7 back?
F:\>mkdir hgme
F:\>cd hgme
F:\hgme>hg init
F:\hgme>echo the code is 7 > code.txt
F:\hgme>hg add code.txt
F:\hgme>hg commit -m "this is version 1"
F:\hgme>cd ..
F:\>hg clone hgme hgpeter
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\>cd hgpeter
F:\hgpeter>type code.txt
the code is 7
F:\hgpeter>cd ..
F:\>cd hgme
F:\hgme>notepad code.txt [now i change 7 to 11]
F:\hgme>hg commit -m "this is version 2"
F:\hgme>cd ..
F:\>cd hgpeter
F:\hgpeter>hg pull
pulling from f:\hgme
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
(run 'hg update' to get a working copy)
F:\hgpeter>hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\hgpeter>type code.txt
the code is 11
F:\hgpeter>cd ..
F:\>cd hgme
F:\hgme>hg rollback
rolling back last transaction
F:\hgme>cd ..
F:\>hg clone hgme hgmary
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\>cd hgmary
F:\hgmary>type code.txt
the code is 7
F:\hgmary>cd ..
F:\>cd hgpeter
F:\hgpeter>hg pull
pulling from f:\hgme
searching for changes
no changes found
F:\hgpeter>hg update
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
F:\hgpeter>type code.txt
the code is 11
F:\hgpeter>
I'm using egg (emacs got git) as git interface in emacs.
Whenever I try to achieve a commit --amend, I receive a "GIT-COMMIT-AMEND> Aborting commit due to empty commit message".
This is what i do:
C-u C-x v c
Then the commit buffer appears, with the message of my previous commit.
Then upon C-c C-c I get the message stated above: empty commit message.
I think I've had this behaviour with regular commits (as in not amend) before, but can't remember or find how I solved it.
I tried editing the message (adding a space somewhere). No work.
I tried saving the buffer before committing, that wouldn't work either (since C-c C-c is not active in another buffer than the commit buffer).
Any clue?
I am new to LINQ, and so am struggle over some queries that I'm sure are pretty simple. In any case, I have been hiting my head against this for a while, but I'm stumped.
Can anyone here help me convert this T-SQL query into a LINQ query? Once I see how it is done, I'm sure I'll have some question about the syntax:
SELECT BlogTitle
FROM Blogs b
JOIN BlogComments bc ON
b.BlogID = bc.BlogID
WHERE b.Deleted = 0
AND b.Draft = 0
AND b.[Default] = 0
AND bc.Deleted = 0
GROUP BY BlogTitle
ORDER BY MAX([bc].[Timestamp]) DESC
Just to show that I have tried to solve this on my own, here is what I've come up with so far, though it doesn't compile, let alone work ...
var iqueryable =
from blog in db.Blogs
join blogComment in db.BlogComments on
blog.BlogID equals blogComment.BlogID
where blog.Deleted == false
&& blog.Draft == false
&& blog.Default == false
&& blogComment.Deleted == false
group blogComment by blog.BlogID into blogGroup
orderby blogGroup.Max(blogComment => blogComment.Timestamp)
select blogGroup;
I have played/worked with many different programming languages and Dylan is still one of my favorites.
My question is why did Dylan fail when Objective-C, Ruby and even Scheme have had more success?
Was Dylans performance that much worse than Objective-C that Apple went with it or was purely for social/political reasons.
Hopefully someone from apple will see this question :)
BTW if you have no idea what Dylan is please google Dylan Progrmaming Language.
Is there are an easy way to initialize byte array from portion of existing byte array. In C language it is possible to use pointer to say like
char s[10] = new char[10];
char* b = s + 5;
Is it possible to do that in c#, like:
byte[] b = new byte[buffersize];
byte* header = b + 5;
byte* data = b + 25;