I'm using a richtext box to concatenate a log message.
And it seems I got an error: "the settings of this property is too long"
So is there a size limit ?
I need to allow access to an svn repository using email addresses as the user name. I can log in to the server over ssh no problem by changing the email address "@" to a "$" like so:
ssh [email protected]
Unfortunately, the same does not work for svn+ssh. This gets me nowhere:
svn ls svn+ssh://[email protected]/home/accountname/data/svn/repos
Anyone know how this is usually done?
Can you tell me the meaning of this statement.I am using windows 2008 server OS
Log Problem must be changed so that it elevates privileges for a user executing the Problem.
its done by creating a manifest that indicates that Problem needs Administrator privileges.
I'd like to extract all the ISBNs on a dynamic web page that I can't feed through a Yahoo Pipe (the user has to log in to see the page). Is there a way to do that with jQuery? How?
Thanks!
Is there a way to get DVD region code from command line (linux/ubuntu 9.10)?
I want to script this action and store the region code (and other data about DVD) in a log.
in the following link
http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_method
it says:Different values of this variable can have a marked effect on InnoDB performance. For example, on some systems where InnoDB data and log files are located on a SAN, it has been found that setting innodb_flush_method to O_DIRECT can degrade performance of simple SELECT statements by a factor of three.
Why O_DIRECT could slow down the select statement?
I'm on Heroku, and emails don't get sent out in development, but are properly being sent in production. I'd like to run a seperate staging instance on Heroku, but don't want emails being sent out (just to a log).
Binary search follows Divide and Conquer method where as linear Search doesn't follw.The time complexity of Binary Search in O(log n) but incase of linear search the time complexity is O(n).
Thats way Binary search is having bettr prior than linear search.
But it is true when the list of items is large incase of smaller list linear is best(i.e.- it is only when the Best Case concern)
I'm currently using statement-based replication. After upgrading to MySql 5.1, I'm considering using row-based replication.
After reading the docs it seems that you can change the format of the master on the fly.
Will the slave automatically adapt to whatever type of binary log it is sent?
Do I have to make any changes to the slave or master to get ready for switching or can I simply modify the binlog_format variable on the master?
I sometimes check out some previous version of the code to examine or test. I have seen instructions on what to do if I wish to modify previous commits -- but suppose I make no changes. After I've done e.g. git checkout HEAD^, how do I get back to the tip of the branch?.. git log no longer shows me the SHA of the latest commit.
If I have the following table schema to log an exception (in standard SQL schema):
Table: ExceptionLog
Columns: ID (Long),
ExceptionClass (String),
ExceptionMessage (String),
Host (String),
Port (Integer),
HttpHeader (String),
HttpPostBody (String),
HttpMethod (String)
How would I design the same thing in HyperTable (specifically, what is the best approach for efficiency)? And, how would I code it using the HyperTable Java client?
Hello,
I have a filter and parameters in web.xml
web.xml is like this:
<filter>
<description>
</description>
<display-name>AllClassFilter</display-name>
<filter-name>AllClassFilter</filter-name>
<filter-class>com.datval.homework.AllClassFilter</filter-class>
<init-param>
<param-name>DB_URL</param-name>
<param-value>jdbc:derby:C:/Users/admin/workspace/homework03/homework/databases/StudentsDB;create=true</param-value>
</init-param>
<init-param>
<param-name>DB_DIALECT</param-name>
<param-value>org.hibernate.dialect.DerbyDialect</param-value>
</init-param>
<init-param>
<param-name>DB_DRIVER</param-name>
<param-value>org.apache.derby.jdbc.EmbeddedDriver</param-value>
</init-param>
</filter>
mapping is working well.
But I can't get this parameters in my filter.
public void init(FilterConfig config) throws ServletException {
// TODO Auto-generated method stub
debugMessage = config.getInitParameter("debugMessage");
ctx = config.getServletContext();
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
// TODO Auto-generated method stub
// place your code here
ctx.log("Start - " + debugMessage);
String myDbUrl = ctx.getInitParameter("DB_URL");
String DB_DIALECT = ctx.getInitParameter("DB_DIALECT");
String DB_DRIVER = ctx.getInitParameter("DB_DRIVER");
Map<String,String> pr = new HashMap<String,String>();
pr.put("hibernate.connection.url", myDbUrl);
pr.put("hibernate.dialect", DB_DIALECT);
pr.put("hibernate.connection.driver_class", DB_DRIVER);
EntityManagerFactory emf = Persistence.createEntityManagerFactory("students",pr);
EntityManager em = emf.createEntityManager();
request.setAttribute("em", em);
chain.doFilter(request, response);
em.close();
ctx.log("end - " + debugMessage);
}
I have checked and myDbUrl is null. What I'm doing wrong? Any idea?
Sorry about code, I will change it later :)
I have the following html code:
<i class="small ele class1"></i>
<i class="medium ele class1"></i>
<i class="large ele class1"></i>
<div class="clear"></div>
<i class="small ele class2"></i>
<i class="medium ele class2"></i>
<i class="large ele class2"></i>
<div class="clear"></div>
<i class="small ele class3"></i>
<i class="medium ele class3"></i>
<i class="large ele class3"></i>
<div class="clear"></div>
<i class="small ele class4"></i>
<i class="medium ele class4"></i>
<i class="large ele class4"></i>?
And my javascript looks like so:
var resize = function(face, s) {
var bb = face.getBBox();
console.log(bb);
var w = bb.width;
var h = bb.height;
var max = w;
if (h > max) {
max = h;
}
var scale = s / max;
var ox = -bb.x+((max-w)/2);
var oy = -bb.y+((max-h)/2);
console.log(s+' '+h+' '+bb.y);
face.attr({
"transform": "s" + scale + "," + scale + ",0,0" + "t" + ox + "," + oy
});
}
$('.ele').each(function() {
var s = $(this).innerWidth();
var paper = Raphael($(this)[0], s, s);
var face = $(this).hasClass("class1") ? class1Generator(paper) : class4Generator(paper);
/*switch (true) {
case $(this).hasClass('class1'):
class1Generator(paper);
break;
case $(this).hasClass('class2'):
class2Generator(paper)
break;
case $(this).hasClass('class3'):
class3Generator(paper)
break;
case $(this).hasClass('class4'):
class4Generator(paper)
break;
}*/
resize(face, s);
});
my question is, how could I make this line of code more scalable? I tried using a switch but
The script below is calling two functions if one of the elements has a class, but what If i have 10 classes?
I don't think is the best solution I created a jsFiddle http://jsfiddle.net/7uUgz/6/
//var face = $(this).hasClass("awesome") ? awesomeGenerator(paper) : awfulGenerator(paper);
Im just curious if anyone has had success trying to run the Groovy Grails tool suite on an Amazon AWS EC2 instance with its display exported into your windows machine. If so, I wanted to know which flavor of linux was used on the EC2. I am not having much success with it on the Amazon Linux but haven't tried their Ubuntu instances yet. I got all the way to getting GGTS installed and getting the display exported but when I launch GGTS I get log errors about libraries missing. This is most likely because I didn't use yum to install it so I am probably missing dependencies but I didn't have a choice its not offered as a yum package. Here are my log file errors when I try to launch GGTS:
!SESSION 2014-06-08 03:08:04.873 -----------------------------------------------
eclipse.buildId=3.5.1.201405030657-RELEASE-e43
java.version=1.7.0_55
java.vendor=Oracle Corporation
Framework arguments: -product org.springsource.ggts.ide
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.springsourc
e.ggts.ide
!ENTRY org.eclipse.osgi 4 0 2014-06-08 03:08:12.116
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/home/ec2-user/ggts_sh/ggts-3.5.1.RELEASE/configuration/org.eclipse.osgi
/bundles/704/1/.cp/libswt-pi-gtk-4335.so: libgtk-x11-2.0.so.0: cannot open share
d object file: No such file or directory
no swt-pi-gtk in java.library.path
/home/ec2-user/.swt/lib/linux/x86_64/libswt-pi-gtk-4335.so: libgtk-x11-2
.0.so.0: cannot open shared object file: No such file or directory
Can't load library: /home/ec2-user/.swt/lib/linux/x86_64/libswt-pi-gtk.s
o
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:45)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:133)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:679)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(
IDEApplication.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEAppli
cation.java:96)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandl
e.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppli
cation(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ec
lipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja
va:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
I was wondering if it is possible to log into a site with the normal login form (take facebook for example) through a proxy server. Once logged in, can a person disconnect from the proxy and use their normal ISP connection to access the members area on the site without logging in again?
Thanks!
This query appears in mysql slow query log: it takes 11 seconds.
INSERT INTO record_visits
( record_id, visit_day )
VALUES
( '567', NOW() );
The table has 501043 records and it's structure looks like this:
CREATE TABLE IF NOT EXISTS `record_visits` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`record_id` int(11) DEFAULT NULL,
`visit_day` date DEFAULT NULL,
`visit_cnt` bigint(20) DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `record_id_visit_day` (`record_id`,`visit_day`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
What could be wrong? Why this INSERT takes so long?
Is it possible to have multiple authentication methods for a java servlet? For example, have form based authentication in addition to open id based authentication so users can choose how they log in.
When using openid I get the following error from stackoverflow:
Unable to log in with your OpenID provider:
Error occurred while sending a direct message or getting the response.
Click your OpenID account provider:
why?
I'm trying to implement a GridView that Focuses the next Item and "Overscrolls at the End of a List.
E.g.
1 2 3
4 5 6
7 8 9
I want to scroll 1 2 3 4 5 6 ... just by pressing the right Key. Right now I can only Scroll 1 2 3 and then it stops and I have to scroll with the down Key.
I already tried to set the focusViews in code (In the getView() method of my ArrayList Adapter, that fills the GridView)
view.setId(position);
view.setNextFocusLeftId(position-1);
view.setNextFocusRightId(position+1);
But that doesn't work. I found the boolean *Scroll(int direction) Methods on grepcode
But theese are Package Local and I can't overwrite them. Any suggestions on how to solve this. Can I use another View and get the same Layout as a Gridview?
I also set a OnFocusChangeListener to see what happens with no reaction.
Edit:
I just added this to my MainActivity, but now it seems to onKeyDown only get called when the GridView doesn't handle the KeyEvent (If the Last Item in a row is selected).
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
if (focusedView > 0) {
mContainer.setSelection(--focusedView);
Log.v("TEST", focusedView+"");
}
return true;
case KeyEvent.KEYCODE_DPAD_RIGHT:
if (focusedView < mAdapter.getCount() - 1) {
mContainer.setSelection(++focusedView);
Log.v("TEST", focusedView+"");
}
return true;
}
return super.onKeyDown(keyCode, event);
}
Edit 2: This is so f***ing stupid but works so damn fine :D
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
mContainer.onKeyDown(KeyEvent.KEYCODE_DPAD_UP, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_UP));
mContainer.onKeyDown(KeyEvent.KEYCODE_DPAD_RIGHT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT));
mContainer.onKeyDown(KeyEvent.KEYCODE_DPAD_RIGHT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT));
return true;
case KeyEvent.KEYCODE_DPAD_RIGHT:
mContainer.onKeyDown(KeyEvent.KEYCODE_DPAD_DOWN, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_DOWN));
mContainer.onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_LEFT));
mContainer.onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_LEFT));
return true;
}
return super.onKeyDown(keyCode, event);
}
I really don't want to post this as Answer, and I really don't want to have to use this Code because it is such a stupid workaround
;TLDR: Help still needed
Hi,
I have a custom HTTP Module. I would like to inject the logger using my IoC framework, so I can log errors in the module. However, of course I don't get a constructor, so can't inject it into that. What's the best way to go about this?
If you need the specific IoC container - I'm currently using Windsor, but may soon move to AutoFac.
Thanks
I'm opening a sheet on a window , the first time the sheet opens
correctly, but if I close it, and try to open again it doesn't work, I
just get the system alert sound.
- (IBAction) showSpeedSheet:(id)sender
{
[NSApp beginSheet:addEditPackagePanel
modalForWindow:[[NSApp delegate] window]
modalDelegate:nil
didEndSelector:nil
contextInfo:nil];
}
-(IBAction)endSpeedSheet:(id)sender
{
[NSApp endSheet:addEditPackagePanel];
[addEditPackagePanel orderOut:sender];
}
I can't find what's wrong, the app doesn't print any error on the log.
I am logging errors in my controllers method:
protected override void OnException(ExceptionContext filterContext)
But if I make a type in my view page, or enter a route that doesn't exist, it doesn't seem to log that erorr?
Every time I start apache , it always fails.
The problem is in loadmodulephp5...
The error log:[warn] pid file C:/windows/Apache2/logs/httpd.pid overwritten — Unclean shutdown of previous Apache run?
I tried to delete this file and then start apache.But this file had been created again.
Any solution?