i have question how good is this book?
http://www.amazon.com/Concrete-Mathematics-Foundation-Computer-Science/dp/0201558025/
?
and can anybody advise good books about bit manipulations?
for example how good is this book?
http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201914654/
Provided a url, within a string of text (tweet) such as
"Check out my twitpic http://twitpic.com/1876544594 its awesome"
I need a Rails regex that will return 18744594, the id of this particular twitpic...
This question has been asked here but was for PHP, and I need it for Rails.
I would also be able to pull the name of the site, so the text between http:// and .com "twitpic"
Some sites, like here at SO, allow 'bogus' slugs in the URL. Before implementing URL slugs on my site, I have a question of 'best practices'...
Given a structure like example.com/123/article-slug-here/, if my site allows bogus slugs by querying on the ID -
Should I ...
just do a redirect to the appropriate/canonical URL (verifying the slug, and redirecting in case of a mismatch)?
-or-
return a 404, since technically example.com/123/this-article-s-u-x doesn't exist?
I would like to find an open source example of a code for deterministic annealing. It can be in almost any language: C, C++, MatLab/Octave, Fortran. I have already found a MatLab code for simulated annealing, so MatLab would be best. Here is a paper that describes the algorithm: http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CB8QFjAA&url=http%3A%2F%2Fvandamteaching.googlepages.com%2FABriefIntroductionToDeterministicAnn.pdf&ei=DiLiS8qZFI7AMozB1JED&usg=AFQjCNHLps7HRWXLNN5rAX5aJ5BsJbcHuQ&sig2=YSokUTOs0UszAFZ9TDiJgQ
There seems to be a strange gap on the left side of the colorbox when it's laying over a Sifr element.
This picture shows the Sifr titles: i39.tinypic.com/zthws0.gif (paste in address bar)
This one shows the colorbox being toggled on. Mind the gaps near the Sifr titles: http://i42.tinypic.com/25ft1td.gif
Does anyone know how to solve this?
I am trying to connect to my webserver via ssh but I can't. When I insert the password then the terminal is blocked. This is what I see:
# ssh [email protected].com[email protected].com's password:
Why ?
In iptables there are no rules.
Please help :(
To Editors: Sorry, I didnt realise the question thing till you pointed it out. Also I didn't know about the appengine tag, I'm assuming it was selected by mistake from that JS autosuggestion box (it usually happens with me, I run a P3) my apologies for that too. I've edited it now, if it doesnt work let me know.
Hi all, I'm making (or at least trying to make) a Google bookmarks accelerator for IE8, but I keep running into "Internet Explorer could not install this accelerator. There was a problem with the Accelerator's information."
Does anyone know why this is happening? Here is the code I've made
<?xml version="1.0" encoding="UTF-8" ?>
<os:openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
<os:homepageUrl>http://www.google.com/bookmarks</os:homepageUrl>
<os:display>
<os:description>Add this page to GoogleBookmarks</os:description>
<os:name>Add to GoogleBookmarks</os:name>
<os:icon>http://www.google.com/favicon.ico</os:icon>
</os:display>
<os:activity category="Bookmarks">
<os:activityAction context="document">
<os:execute method="get" action="http://www.google.com/bookmarks/mark?op=add&output=popup">
<os:parameter name="bkmk" value="{documentUrl}" />
<os:parameter name="title" value="{documentTitle}" />
<os:parameter name="annotation" value="{selection}" />
</os:execute>
</os:activityAction>
</os:activity>
</os:openServiceDescription>
These are the references I used:
MSDN Developers Guide
MSDN Format Specification
Unofficial Google API (used as a
look up so far)
and yes i know that I cannot send document variables between schemes (HTTP - HTTPS, for example) or between servers in different security zones (Intranet - Internet etc)
Also, if this is the wrong place, what are the recommended sites and/or forums for xml related posts? (not really questions - but more like full blown detailed rant like posts)
Thanks
How to create custom javadoc tags such as @pre / @post... I found some links that explain it but i haven had luck with them, i dont know if that am already tired but i can figure where to put it. these are some of the links
http://www.developer.com/java/other/article.php/3085991/Javadoc-Programming.html
http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html
I'm sorry to ask to be spoon fed but am at the stage where i only see black dots on the screen :\
Thanks a bunch
Im trying to find how to take a page request such as http://www.domain.com/sam/?dog=woof&cat=meow and send it to http://www.domain.com/animals.php?dog=woof&cat=meow
Ive tried a few things ive found on here, or i adapted them i should say, but i keep getting either nothing, or infinite loops.
Any ideas?
Is it possible to manipulate an inbound request at the IIS level, before it even gets assigned to site on the server?
Essentially, I want to rewrite this --
www.somegenericdomain.com?site=someotherdomain
To this --
www.someotherdomain.com
And I need to do this before IIS picks which site the request belongs to, so I need to change the host header prior to this point.
Possible, or crazy? We're running IIS7.
Hey there
i have a lightbox that contains a button images where once the user/visitor clicks on that images its adds the item into cart.
what i am trying to do is that once the button is clicked it adds the item without close the ifram is it possible
i am using http://www.huddletogether.com/projects/lightbox2/
the cart that i used is http://conceptlogic.com/jcart/
For HTML input, I want to neutralize all HTML elements that have inline js (onclick="..", onmouseout=".." etc).
I am thinking, isn't it enough to encode the following chars? =,(,)
So onclick="location.href='ggg.com'"
will become
onclick%3D"location.href%3D'ggg.com'"
What am I missing here?
Edit: I do need to accept active HTML (I can't escape it all or entities is it).
i use this to download all data from my google app:
i follow this article: http://code.google.com/intl/en/appengine/docs/python/tools/uploadingdata.html#Creating_Exporter_Classes
and download data use this:
bulkloader.py --dump --url=http://zjm1126.appspot.com/remote_api --filename=b.csv
but the data is :
so how to make the data readable ?
thanks
I'm retrieving an array of objects from a hidden html input field. The string I'm getting is:
"{"id":"1234","name":"john smith","email":"jsmith@blah.com"},{"id":"4431","name":"marry doe","email":"mdoe@blah.com"}"
Now I need to pass this as an array of objects again. How do I convert this string into array of objects?
Hello,
I want to implement single sign on in my asp.net web application. Scenario is something like below:
user will get registered / sign up at "account.example.com"
there will a link to "professional.example.com"
when user goes to this link (step 2), they must remain logged in over here.
Please suggest me the best solution for this.
Regards,
Pratik
I have LI that I want to fade out and back in. Within the list item I have some text. This text is positioned absolutely within the LI.
The catch is that in IE8 (IE6 and 7 seem fine) I can get everything to fade except the text:
http://jsbin.com/esamu/13
If I remove the absolute positioning on the text element (in this case, a P), IE8 then can fade the text properly:
http://jsbin.com/esamu/14
Anyone know why this is? Anyone know of a fix?
hi my dear friends :
why radajax manager do this to me ?
plz see these pictures beloaw...
http://www.2shared.com/file/12426877/11c38fb4/WithOut_RadAjaxManager.html
http://www.2shared.com/file/12426799/63a4c800/With_RadAjaxManager.html
this problem exists about every control inside radajaxmanager
i mean radajaxmanager displaces my controls...
how can i fix this?
thanks for your attention
Apache web hosts have a user-configurable ~/.htaccess file that allows local redirects, for example, www.awesomesite.com = www.awesomesite.com/launchmyawesomeapp.cgi
In lighttpd I know there is a global /etc/lighttpd.conf file, but is there something local like the Apache htaccess file?
thanks,
joe
Using the standard gem for using Markaby with Sinatra, listed at http://www.sinatrarb.com/extensions-wild.html
sudo gem install markaby
Password:
Successfully installed builder-2.1.2
Successfully installed markaby-0.5
2 gems installed
sudo gem install sbfaulkner-sinatra-markaby -s http://gems.github.com
Password:
Successfully installed sbfaulkner-sinatra-markaby-0.9.2.2
1 gem installed
require 'rubygems'
require 'sinatra'
require 'sinatra/markaby'
get '/' do
markaby :template
end
RuntimeError at /
Template engine not found: mab
I'm pretty new to Websphere application development and I'm missing the source attachment for all the classes in the com.ibm.wps.* packages in my IBM Rational Application Developer setup. For example the class com.ibm.wps.engine.Command from JAR wp.engine.impl.jar has no source attached.
Do I have to install another package with the sources or where can I find it?
Also, excuse the question if it is so trivial and stupid... :-}
Hi all,
I have two tables and respective classes in java.The mapping in the HBM.xml is as follows :
The query in the HBM.xml is as follows :
from Reports as rep left join rep.parts as parts
I am getting the following exception while executing the code :
May 19, 2010 10:47:04 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 904, SQLState: 42000
May 19, 2010 10:47:04 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ORA-00904: "REPORTS0_"."PARTNO": invalid identifier
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2223)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.hcl.spring.db.sample.dao.ItemDAOImpl.loadItems(ItemDAOImpl.java:43)
at com.hcl.spring.db.sample.service.ItemServiceImpl.loadItems(ItemServiceImpl.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy3.loadItems(Unknown Source)
at com.hcl.spring.db.sample.Main.loadItems(Main.java:40)
at com.hcl.spring.db.sample.Main.main(Main.java:19)
Caused by: java.sql.SQLException: ORA-00904: "REPORTS0_"."PARTNO": invalid identifier
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
... 22 more
Do request your help on the same.
Hi I have just started using IntelliJ again and have version 9. I just installed the Mecurial plugin and now the ide won't start anymore.
Has an error of
Fatal error initializing class com.intellij.openapi.actionSystem.ActionManager:
java.lang.VerifyError: class com.dcx.hg.MercurialVcs overrides final method getName.()Ljava/lang/String;
I now know that I should be using the plugin hg4idea
Is there a way I can remove this plugin so I can start the ide, I am sure there must be..
Thanks in advance.
I am running a Apache Server . I have a simple screen capture set up using Html2canvas .The capture function is rendering a blank Image . I have tried numerous ways to configure the javascript using related articles from this site to no Avail . The code is all working and tested because I can capture the image prior to "google maps api being loaded . Thank you and any advice would be much appreciated .
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<title>Tester</title>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="html2canvas.js"></script>
<script type="text/javascript" src="jquery.plugin.html2canvas.js"></script>
<script src="http://www.google.com/jsapi?key=ABQIAAAAwbkbZLyhsmTCWXbTcjbgbRSzHs7K5SvaUdm8ua-Xxy_-2dYwMxQMhnagaawTo7L1FE1-amhuQxIlXw"></script>
<script>
google.load("earth", "1");
var ge = null;
function init() {
google.earth.createInstance("map_canvas", initCallback, failureCallback);
}
function initCallback(object) {
ge = object;
ge.getWindow().setVisibility(true);
}
function failureCallback(object) {
}
function capture() {
$('#target').html2canvas({
onrendered: function (canvas) {
//Set hidden field's value to image data (base-64 string)
$('#img_val').val(canvas.toDataURL("image/png"));
//Submit the form manually
document.getElementById("myForm").submit();
}
});
}
</script>
<style type="text/css">
#map_canvas {position: fixed; top: 60px;
left: 0px; right:0px; bottom:0px; }
#target {
border: 1px solid #CCC;
margin: 0px; padding:0px; position: absolute; left: 10px;top: 80px;height: 580px; width: 580px;
}
</style>
</head>
<body onload='init()' id='body'>
<form method="POST" enctype="multipart/form-data" action="save.php" id="myForm">
<input type="hidden" name="img_val" id="img_val" value="" />
</form>
<input type="submit" value="Take Screenshot Of Div Below" onclick="capture();" />
<div id="target">
<div id="map_canvas"> </div>
</div>
</body>
</html>
This is the php document renders to save.php
<?php
//Get the base-64 string from data
$filteredData=substr($_POST['img_val'], strpos($_POST['img_val'], ",")+1);
//Decode the string
$unencodedData=base64_decode($filteredData);
//Save the image
file_put_contents('img.png', $unencodedData);
?>
<h2>Save the image and show to user</h2>
<table>
<tr>
<td>
<a href="img.png" target="blank">
Click Here to See The Image Saved to Server</a>
</td>
<td align="right">
<a href="index.php">
Click Here to Go Back</a>
</td>
</tr>
<tr>
<td colspan="2">
<br />
<br />
<span>
Here is Client-sided image:
</span>
<br />
<?php
//Show the image
echo '<img src="'.$_POST['img_val'].'" />';
?>
</td>
</tr>
</table>
<style type="text/css">
body, a, span {
font-family: Tahoma; font-size: 10pt; font-weight: bold;
}
</style>
This sample works Correctly . I want to achieve this with above Code using "Google Earth"
<!DOCTYPE html>
<html>
<head>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"></script>
<script type="text/javascript" src ="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="html2canvas.js"></script>
<script type="text/javascript" src="jquery.plugin.html2canvas.js"></script>
</script>
<script type="text/javascript">
function initialize()
{
var mapProp = {
center:new google.maps.LatLng(51.508742,-0.120850),
zoom:5,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"), mapProp);
}
google.maps.event.addDomListener(window, 'load', initialize);
$(window).load(function(){
$('#load').click(function(){
html2canvas($('#googleMap'), {
useCORS: true,
onrendered: function (canvas) {
var dataUrl= canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
window.location.href = dataUrl;
}
});
});
});
</script>
</head>
<body>
<div id="googleMap" style="width:500px;height:380px;"></div>
<input type="button" value="Save" id="load"/>
</body>
</html>
void Application_BeginRequest(Object sender, EventArgs e)
{
HttpApplication app = sender as HttpApplication;
if (app != null)
if (app.Request.AppRelativeCurrentExecutionFilePath == "~/About.aspx")
app.Context.RewritePath(
app.Request.Url.PathAndQuery.Replace("/About.aspx", "")
);
}
I want to hide url like the following :
requested url : "http://domain.com/WebFolder/page.aspx"
url should be show : "http://domain.com/WebFolder"
How I can do that I try the above code but it is not work causing to redirect new rewrite page I dont want it, I just want to hide my url for section of page name.