im looking for a way to implement a addin that can convert a C# solution into a mono compiled exe, so i can use it on a linux and mac environment that have the mono framework installed.
Im currently developing an app that can parse dates from an email - i.e extract the time and dates from an email (similar to gmail).
Currently I do this in php but this is a tad clunky.
Whats the best language to do this in and are there any existing open source solutions?
Im try to performe two [TestMethod] in an oder
First: Login
Second: GetUser
But Test chose the Second to be First.
Have a way to set order os [TestMethod]????
Help !!
Hello,
I`ve been looking for a serverside language for some time, and python got my attention somewhat.
But as I already know and love javascript, I now want learn to code on the server with js and node.js.
Now, what books and what subjects do I need to learn to understand the serverside world better?
(let me know if Im to vague)
I have a JSON web service that I want to run on the same domain as my Web page. Both are to be used in Azure. They need to be on the same domain because since Im doing a JSON call, JSONP is not an option atm.
I was thinking that my web would have the address http://example.cloudapp.net/, and my Web Service should have the address http://example.cloudapp.net/webservice/
Hello,
Is it possible to "deny from all" apache htaccess style using php.
I can't use htaccess because im using different webserver, so i wan't to use php to workaround it.
So let say user are trying to access folder name 'david', all content and subdirectory are denied from viewing.
I'm working with images (each of size = 5MB). The following code extract some information from each image that is present in the given directory. I'm getting out of memory exception. The size of the process is around (1.5GB). I don't know why garbage collector is not freeing memory.
I even tried adding GC.Collect() as last line of foreach loop. Still I'm getting 'OutOFMemory'
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
namespace TrainSVM
{
class Program
{
static void Main(string[] args)
{
FileStream fs = new FileStream("dg.train",FileMode.OpenOrCreate,FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
String[] filePathArr = Directory.GetFiles("E:\\images\\");
foreach (string filePath in filePathArr)
{
if (filePath.Contains("lmn"))
{
sw.Write("1 ");
Console.Write("1 ");
}
else
{
sw.Write("1 ");
Console.Write("1 ");
}
Bitmap originalBMP = new Bitmap(filePath);
/***********************/
Bitmap imageBody;
ImageBody.ImageBody im = new ImageBody.ImageBody(originalBMP);
imageBody = im.GetImageBody(-1);
/* white coat */
Bitmap whiteCoatBitmap = Rgb2Hsi.Rgb2Hsi.GetHuePlane(imageBody);
float WhiteCoatPixelPercentage = Rgb2Hsi.Rgb2Hsi.GetWhiteCoatPixelPercentage(whiteCoatBitmap);
//Console.Write("whiteDone\t");
sw.Write("1:" + WhiteCoatPixelPercentage + " ");
Console.Write("1:" + WhiteCoatPixelPercentage + " ");
/******************/
Quaternion.Quaternion qtr = new Quaternion.Quaternion(-15);
Bitmap yellowCoatBMP = qtr.processImage(imageBody);
//yellowCoatBMP.Save("yellowCoat.bmp");
float yellowCoatPixelPercentage = qtr.GetYellowCoatPixelPercentage(yellowCoatBMP);
//Console.Write("yellowCoatDone\t");
sw.Write("2:" + yellowCoatPixelPercentage + " ");
Console.Write("2:" + yellowCoatPixelPercentage + " ");
/**********************/
Bitmap balckPatchBitmap = BlackPatchDetection.BlackPatchDetector.MarkBlackPatches(imageBody);
float BlackPatchPixelPercentage = BlackPatchDetection.BlackPatchDetector.BlackPatchPercentage;
//Console.Write("balckPatchDone\n");
sw.Write("3:" + BlackPatchPixelPercentage + "\n");
Console.Write("3:" + BlackPatchPixelPercentage + "\n");
balckPatchBitmap.Dispose();
yellowCoatBMP.Dispose();
whiteCoatBitmap.Dispose();
originalBMP.Dispose();
sw.Flush();
}
sw.Dispose();
fs.Dispose();
}
}
}
IM DEVELOPING AN ANDROID APPLICATION WHERE in a website i PROGRAMMATICALLY submit data into search box and retrieve results by JAVA.
i get the data by using URLConnect JAVA. i get the source code ie html code......
Urlconnection a = .connect to host
getinputstream
read data
i use these functions
now if the site has content like:
sahil
3/5 patel chowk
965955
since these details will be inside html tags i want to extract this information . any idea
I downloaded jquery effects example and all effects are appearing only onclick but i want it to be executed on document.ready() and continue...
<script type="text/javascript">
var ImgIdx = 2;//To mark which image will be select next
function PreloadImg(){
$.ImagePreload("images/im2.jpg");
$.ImagePreload("images/im3.jpg");
$.ImagePreload("images/im4.jpg");
$.ImagePreload("images/im5.jpg");
}
$(document).ready(function(){
PreloadImg();
$(".SlashEff ul li").click(function(){
$(".Slash").ImageSwitch({Type:$(this).attr("rel"), NewImage:"images/im"+ImgIdx+".jpg", speed: 4000
});
ImgIdx++;
if(ImgIdx>5) ImgIdx = 1;
});
});
</script>
and my
<div class="SlashEff">
<ul>
<li class="TryFadeIn" rel="FadeIn">Fade in</li>
<li class="TryFlyIn" rel="FlyIn">Fly in</li>
<li class="TryFlyOut" rel="FlyOut">Fly out</li>
<li class="TryFlipIn" rel="FlipIn">Flip in</li>
<li class="TryFlipOut" rel="FlipOut">Flip out</li>
<li class="TryScroll" rel="ScrollIn">Scroll in</li>
<li class="TryScroll" rel="ScrollOut">Scroll out</li>
<li class="TrySingleDoor" rel="SingleDoor">Single Door</li>
<li class="TryDoubleDoor" rel="DoubleDoor">Double Door</li>
</ul>
</div>
Here is the link http://www.hieu.co.uk/blog/index.php/imageswitch/
I tried this,
$(document).ready(function(){
PreloadImg();
$(".Slash").ImageSwitch({Type:$(this).attr("rel"),
NewImage:"images/im"+ImgIdx+".jpg", speed: 4000
});
ImgIdx++;
if(ImgIdx>5) ImgIdx = 1;
});
I tried this but it gets executed only once.... I want to execute this every 5000ms... Is this possible...
im using Treeview in my master page...and every node except last node get selected if i click on it and can be redirect to respond treenode page...but when i click last node of the treeview the selectednode changed event doesnt fired it just stop page load event itself(breakpoint).....
how can i solve this problem?
Hi,
Im using maven to build a multi module project. But some projects are in a different svn server. I know it is not a good practice, but that choice was made following some considerations.
Anyway, everything works fine, but I'm not able to find a way to download projects from an alternate repository location.
Is this possible?
Thanks!
Ive tried several approaches and even copy/pasted from http://code.google.com/p/phpwebsocket/
Im using Google Chrome 5.0.375.70 beta and the error is always the same:
Error: INVALID_STATE_ERR: DOM Exception 11
when debugging I see the readyState is always 0 (connecting), no other error is shown.
Any ideas?
Can someone explain how the RC2 key schedule works (particularly the very beginning of it)? i know it uses little endian, but my implementation is not working for any key except "0000 0000 0000 0000"
Test Vector
Key = 88bc a90e 9087 5a
Plaintext = 0000 0000 0000 0000
Ciphertext = 6ccf 4308 974c 267f
im assuming that the first thing to do with the key would be to change it into
bc88 0ea9 8790 5a
and yes i know RC2 is not even used anymore, but i would still like to know
Im using like this:
def child_render
super_render {
print GridModule.new.render
}
end
def super_render
@yield_value = yield
end
and got: Cannot yield from a Proc type filter. The Proc must take two arguments and execute #call on the second argument.
Hey,
Im sure I am missing something here but none the less.
foo['bar'] = nil
if(foo['bar'] == nil)
puts "foo bar is nil :("
However, nothing happens? Any thoughts?
Hi ,
My page throws error exception of type 'system.outofmemoryexception' was thrown .
This happens when i press submit button in submit button there are sqlconnections with stored procedure as im populating grid with data .
It gives error when i put code in submit button. But when i put tht on page load it works good .
Can anyone help me on this .
Thanks,
Smartdev
I'm using lxml as follows to parse an exported XML file from another system:
xmldoc = open(filename)
etree.parse(xmldoc)
But im getting:
lxml.etree.XMLSyntaxError: Entity
'eacute' not defined, line 4495,
column 46
Obviously it's having problems with unicode entity names - but how would i get round this? Via open() or parse()?
im now developing a project using winpcap..as i have known packets being sniffed are usually fragmented packets.
how to reassemble this TCP segements?..any ideas, suggestion or tutorials available?..
this i assume to be the only way i can view the HTTP header...
thanks!..
im using asp.net crystal report and this is sql query
CONVERT(NUMERIC(8, 2), CASE
WHEN
CASE WHEN GLDD_DOC_AMOUNT 0 THEN GLDD_DOC_AMOUNT ELSE 0 END = 0 THEN NULL
ELSE
CASE WHEN GLDD_DOC_AMOUNT 0 THEN GLDD_DOC_AMOUNT ELSE 0 END
END) Q3_DR,
CONVERT(NUMERIC(8, 2), CASE
WHEN (- 1 *
CASE WHEN GLDD_DOC_AMOUNT < 0 THEN GLDD_DOC_AMOUNT ELSE 0 END) = 0 THEN NULL
ELSE - 1 *
CASE WHEN GLDD_DOC_AMOUNT < 0 THEN GLDD_DOC_AMOUNT ELSE 0 END
END) Q3_CR,
i want to write this query into crystal report sql expression field
how can i convert this?
I need to set equal height on a series of divs inside another div wrapper. The problem is that I dont want the same height on all of them. The page kind of have 3 columns and the floating divs can be 1, 2 or 3 columns wide. The divs float left, so the following example will give me three rows of divs in my wrapper. How can I set equal height on the divs that are in the same row? In my example I want nr 1 and 2 to have equal height and 3, 4 and 5 another equal height? I cant know beforehand how many divs there is or how wide or high they are. Edit: They can be for instance 300, 600 or 900 px wide and the page width is 900px
<div id="wrapper">
<div class="one-wide">nr1</div>
<div class="two-wide">nr2</div>
<div class="one-wide">nr3</div>
<div class="one-wide">nr4</div>
<div class="one-wide">nr5</div>
<div class="three-wide">nr6</div>
</div>
Im thinking I somehow need to figure out when the added width of the divs is at the full page width and set equal height on those. Then do the same on the next divs. But I cant wrap my head around it. Currently im just using this to set the height on the children of the wrapper:
$.fn.equalHeights = function(px) {
$(this).each(function(){
var currentTallest = 0;
$(this).children().each(function(i){
if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
});
// for ie6, set height since min-height isn't supported
if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({'height': currentTallest}); }
$(this).children('div').css({'min-height': currentTallest});
});
return this;
};
I'm currently a junior in high school and I've been slacking off on my community service to develop websites and do some personal projects in C#. Currently, I'm developing an web-based IM-Chat through node.js (the server-side Javascript). If I were to post this or other projects on Github or on Google Code, could this be considered community service?—to the programming community?
Hi,
Im trying to load a remote image into a pdf generated by tcpdf however I can't seem to get it to work?
The rest of the pdf loads fine and it looks like to trying to retrieve the image however it just does print to the page?
The code I am using is:
$pdf->Image("http://media.domain.com/logo.jpg", 0, 0, 100, 150, 'JPEG', '', 'T', true, 72,'','','','','','','');
Any help on this would be a massive help,
Thanks,
i need a text editor that support one of those cross platform jS based languages
prefrebly jquery or mootools .
i do not mean a rich text editor. im looking for "intelisence" text editor
to develop in those languages.
Im trying to eliminate two tables from my database. The tables are message_sort_options and per_page_options. These tables basically just have 5 records which are options a user can set as their preference in a preferences table. The preferences table has columns like sort_preferences and per_page_preference which both point to a record in the other two tables containing the options. How can i set up the models with virtual attributes and fixed values for the options - eliminating table lookups every time the preferences are looked up?
I have an nsis installer script for the application im working on and it can place a shortcut on the desktop and in the start menu folder but each shortcut has the wrong start in path and as such the app saves data files to where the short cut is.
Is there an easy way to change the start in path as the documentation was less than helpful on the matter?
Section "Desktop Shortcut" SHORTCUT
SetOutPath "$DESKTOP"
CreateShortcut "${FULL_APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe" "" "$ICONDIR\${DESKICO}"
SectionEnd