If the full path of a file is very long, you can't tell which file is in a given tab. so I'm wondering is there is a way let the tab only disply the file name rather than the full path
of the file, might be convenient in some case. need you help, thanks in advance.
here jj will be the value of FN, but the trouble is iam getting a error message
??? Error using == fopen
Invalid filename.
DirName = 'Samples\mattest\jj';
FileName = split('\\',DirName);
[a,b] = size(FileName);
FN = FileName(b);
file_1 = fopen(FN,'w');
split method was found at
http://www.mathworks.com/matlabcentral/fileexchange/4873
…
I am trying to put images next to each other on a webpage. Here is my HTML:
<img class="pt" src="Yellow Tulip.jpg" title="Yellow Tulip" alt="Yellow Tulip" />
<img class="pt" src="Pink Tulip.jpg" title="Pink Tulip" alt="Pink Tulip" />
<img class="pt" src="Purple Tulip.jpg" title="Purple Tulip" alt="Purple Tulip" />
…
My js code:
$(function(){
var arr = new Array('jj', 'kk', 'oo');
$.post('test12.php', {'arr[]': arr}, function(data){
alert(data);
});
});
PHP code:
<?php
echo print_r($_POST['arr']);
The thing is,$.post receive a key named 'arr[]',it should be used in PHP as 'arr[]' instead of 'arr',but '$_POST['arr[]']'…
I need to write a daemon that supposed to have one TCP socket and one named pipe. Usually if I need to implement a multi IO server with "pure" sockets, the select based multi-IO model is always the one I will choose. so does anyone of you have ever used named pipe in select or you
can just tell me it is impossible. thanks in advance.
let's say there two modules mutualy use each othe as:
package a;
use b;
sub p {}
1;
package b;
use a;
1;
I think symatically it's wrong to wrote code like the above code, cus the two modules will endlessly copy each other's code to themselves...but I can successfully run the following code, which makes me very surprised. so…
I have Java experience and recently am doing some C++ coding. My question is that if I have class A, in which I have to instantiate class B and class C as two of the member variables of A.
If in the constructor of A, should I assume that allocations of class B and C never fail, and handle the bad allocation exception in the…
please look at the following code first.
#! /usr/bin/perl
package foo;
sub new {
my $pkg = shift;
my $self = {};
my $self->{_fd} = undef;
bless $self, $pkg;
return $self;
}
sub Setfd {
my $self = shift;
my $fd = shift;
$self_->{_fd} = $fd;
}
sub write {
my $self = shift;
…
When I enable a new menu in Drupal (for example, mymodule), Drupal should be able to get the menu items from mymodule_menu (hook_menu), process the items and insert the menu items to menu_router and menu_links page.
However, my Drupal fails to do so. Each time I enable a module (written by me or modules contributed by…
I'm looking for good timer implementation in perl. The situation I met is like: I need to keep track of I/O activities of many files and for thoes files keep untouched for enough time a remove action will be taken upon them, so an efficient timer implementation is really vital for
the app I'm involved right now. To…
please looku up the following code first.
#! /usr/bin/perl
package foo;
sub new {
my $pkg = shift;
my $self = {};
my $self->{_fd} = undef;
bless $self, $pkg;
return $self;
}
sub Setfd {
my $self = shift;
my $fd = shift;
$self_->{_fd} = $fd;
}
sub write {
my $self = shift;
print…
Hi,
I'm using pde to run a processing app , and I got the following error :
"Verify that the java.library.path property is correctly set" .
could anyone of you tells me how to solve this problem ?
thanks in advance .
Let's say there are two modules that mutually use each other:
package a;
use b;
sub p {}
1;
package b;
use a;
1;
I think that it is systematically wrong to write code like the above, because the two modules will endlessly copy each other's code to themselves, but I can successfully run the following…
In file .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^\/*get_post\/(.*)$ get_post.php?slug=$0 [L]
</IfModule>
If I type http://example.com/get_post/abcde, I get an empty array of…
Dartisans ep. 10: Dart Plugin for IntelliJ
Ask and vote for questions at: goo.gl Edit and debug your Dart apps with IntelliJ and WebStorm! In this episode of Dartisans, we'll talk to the engineers working on this exciting project. Join hosts Seth Ladd and JJ Behrens to learn more about writing Dart…
People are able to embed my forum's attachments (vbulletin).
I tried to create an htaccess rule for the hotlinking, but it did not work.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com.*$ [NC]
RewriteRule…
YouTube Developers Live: Playlist Party Picker
Submit your questions here: goo.gl Danny Hermes, Jeff Posnick and JJ Behrens discuss how they built Party Playlist Picker, a Python App Engine application that lets Google+ users collaboratively edit…
YouTube API Office Hours June 6, 2012
This is a recording of the YouTube API Hangout on Air from Wednesday 6/6 at 10am PDT (UTC-7). JJ Behrens interviewed Neal Norwitz, a senior engineer at YouTube and well-known Python developer, about Google's…
Dartisans ep 13 - An M1 Birthday Special!
Don't miss this special episode of Dartisans! Hosts JJ Behrens and Seth Ladd, with special guest Gilad Bracha, talk about Dart's M1 release and what's new with the Dart SDK. Ask and vote for questions at…
The app I'm developing requires that it be deployed in China, which means that it needs to have Pinyin and Chinese character handling. I'm told that the way that our customers handle character entry is like so:
Enter in the pinyin character,…
I am new to JUnit and am trying to follow my prof's example.
I have a Person class and a PersonTest class. When I try to compile PersonTest.java, I get the following error:
Exception in thread "main" java.lang.NoSuchMethodError: main
I…
I have two usb-webcams on them machine, but at bot they some switch /dev/video number.
The solution to this problem seems to be new udev rule. I have added this rule in/etc/udev/rules.d/jj-video.rules:
Fix webcam 1
KERNEL=="video1",…
Gartner 2011 Worldwide RDBMS Market Share Reports 48.8% revenue share for Oracle (*)
Gartner has published their market share numbers for 2011 based on total software revenues.
According to Gartner, Oracle:
is #1 in…