I want to make queries according to the parameters I get from my server and query solr server.
First I want a guide how to make a query url and second, how to send it to solr. For the time being I use the default graphical user interface.
I want to make queries according to the parameters I get from my server and query solr server.
First I want a guide how to make a query url and second, how to send it to solr. For the time being I use the default graphical user interface.
I have created following thing in android using android compatibility support package
Basically i have a FragmentAcitivity which shows two Tabs. One Tab represents Fragment #1
and second is Fragment #2
. Fragment #2 has two ListFragment i.e. ListFragment #1 and ListFragment #2 , but the problem is m i am getting following error when i try to do that.
android.view.InflateException: Binary XML file line #10: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:582)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at com.myexample.template.TextVoiceFragment.onCreateView(TextVoiceFragment.java:19)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:837)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1041)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:616)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1359)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:422)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:86)
at android.support.v4.view.ViewPager.populate(ViewPager.java:453)
at android.support.v4.view.ViewPager.onAttachedToWindow(ViewPager.java:563)
at android.view.View.dispatchAttachedToWindow(View.java:6015)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1124)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1129)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1129)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1129)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1129)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1129)
at android.view.ViewRoot.performTraversals(ViewRoot.java:731)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: Content view not yet created
at android.support.v4.app.ListFragment.ensureList(ListFragment.java:328)
at android.support.v4.app.ListFragment.getListView(ListFragment.java:222)
at com.myexample.template.VoiceTemplate.onActivityCreated(VoiceTemplate.java:82)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:858)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1020)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1099)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:263)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:558)
Binary XML
<fragment class="com.myexample.template.VoiceTemplate"
android:id="@+id/voiceListFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
/>
Line number 19 contains inside onCreateView of TextVoiceFragment.class which is Fragment #2 in this case
return inflater.inflate(R.layout.text_voice_fragment, container, false);
Line number 82 contains in code inside onActivityCreated of VoiceTemplate.class which extents ListFragment & a ListFragment #2
//
getListView().setOnItemClickListener( new OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> adapterView, View view,
int position, long arg3) {
// TODO Auto-generated method stub
}
});
i have tried replacing Fragment #2 with FragmentActivity as follows
but in that case i am getting following error
java.lang.ClassCastException: com.myexample.template.TextVoiceFragment
here TextVoiceFragment is Tab second
Please help me out I am getting this error
04-09 15:18:49.120: W/System.err(8085): oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: api.twitter.com
04-09 15:18:49.123: W/System.err(8085): at oauth.signpost.commonshttp.CommonsHttpOAuthProvider.retrieveToken(CommonsHttpOAuthProvider.java:106)
04-09 15:18:49.123: W/System.err(8085): at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:66)
I am using this link https://github.com/brione/Brion-Learns-OAuth example. Please can u say me where I am going wrong..
Thanks in Advacnce..
This is not a specific question but a generic question which was in my mind from long time
I have to check one variable if it contains a value from a list of strings
for e.g.
status == "Open" && status =="Active" && status =="Reopen" && status = "InActive etc..
In SQL it is very easy to write this kind of statements e.g.
select * from ticket where status in ("Open","Active","Reopen","InActive)
I wonder we don't have such easy statement in C#?
Do anybody know any easy way like SQL to write this kind of statements without using generic types of if else ,foreach loop etc..
How to bind ajaxStart/ajaxStop to a form?
I need a loading block to show while uploading the file
Now the form is not submitted at all
var iframe = $('<iframe name="iframe_file_upload" src="'+src_file_upload+'" style="display:none"></iframe>');
var btn_send = $('<input type="button" />')
.click(function(){
$('#form_upload_file').bind('ajaxStart', function(){
$(this).submit();
});
iframe.bind('ajaxStop', function(){
$(this).load(function(){
...
var btn_send = $('<input class="btn btn_margin_left" type="button" value="'+Lang.get('BTN_UPLOAD')+'" />')
.click(function(){
$('#form_upload_file').ajaxForm(function(response){
if(response.error){
// alert error
}
else{
// success
}
Error executing aapt.
Please check aapt is present at /home/padmakumar/android-sdk/platform-tools/aapt NhpAndroid_tablet_k4 line 1 Android ADT Problem
Hint: On 64-bit systems,
make sure the 32-bit libraries are installed: sudo apt-get install ia32-libs
line 1 Android ADT Problem
I can delete 2 errors in problem tab for temp solution or cleaning the projects or deleting the gen/bin folder and recreating or restarting works fine for temporary.
how to resolve permanently to aviod this problem? any help?
Note: I executed this command 'sudo apt-get install ia32-libs' still its asking.
I have two arrays :
$array1 = array(1=>1,10=>1,12=>0,13=>13);
$array2 = array(1=>"Hello",10=>"Test",12=>"check",13=>"error");
Here $array1 have keys and values.Now i want to take first value from $array1(as 1) and want to check if this is repeated in this array .
Here 1 is repeated two times so i want to take the twp keys 1,10 and display the corresponding values of this keys from $array2.If the value in $array1 not repeated just display the value of this key from $array2.
That is i want to get the output as :
Hello Test
check
error
That means ,
In $array1 1,10 keys have same value so value of 1 and 10 from $array2 is merged.then displayed.
Like 12 ,have 0 this is not repeated so simply take value of 12 from $array2.
Like 13.
How can i do this?
In my application I hyave created a datagarm socket and binded a port say 9999 to ip 192.168.173.1 now i want to bind the port to a new ip say 192.168.173.2
but i am not able to do it
Steps i followed
1 DatagramSocket s= new DatagramSocket(port,ip1);
2 s.disconnect();
s.close();
s= new DatagramSocket(port,ip2);
but this gives a java,net,BindException :Address already in use : Cannot bind
any insight would be very helpfull
Hi i am trying to write simple game where there is one player and some simple world like trees or some buildings, player can walk having muchine gun and shoot to world object like trees and finally destroy it, view is from the top so i don't need any gravity. Player can hit a lot of bullets and some monster in world can shoot to. SO there can be a lof of bullets in one time on the screen so i need some good tool to make colision detection. Also important is that player can't now walk on other object, like there is a monster and player and they can't exist in the same place (one shouldn't go on another). Can you recoment me some collision detection engine or better I should write it my self?
I want to create an android app that will send text sms using way2sms gateway can someone please explain how to do so?
I want to dynamically increase the height of tableview cell according to Content of textview in cell. Here I create textview and add that textview in cell as subview. So according to content of textview height of tableview cell is get fixed. Any one know how to do that.
Thanks in advance
I wants to import drupal nodes and blogs into facebook wall. Which module should I use for this function?
I have store 111 million key-value pairs (one key can have multiple values - maximum 2/3) whose key are 50 bit Integers and values are 32 bit (maximum) Integers. Now, my requirements are:
Is there any library for C/C++ which solves this issue ? I can provide 5/6 GB main memory for that. For more info: my previous post.
What is the most efficient way to choose a random value in a stream? Given that each of them has a chance of occurring equally.
Thanks.
I have been using pyserial to read lines sent from an arduino. While it works fine, I was wondering if there are some best practices. In particular when the input needs to be passed through multiple functions (ie, a filter and then a rangefinder class).
How can I use carmen for country_select with formtastic? Right now I am using country_Select and it works fine but I need the iso codes now and it seems it is not provided by country_select.
I have gone through various tutorials/posts to install PHPUnit with Selenium on my Ubuntu system. I believe I have everything setup as required:
/usr/share/php$ phpunit --version
PHPUnit 3.6.10 by Sebastian Bergmann.
So using the IDE I create my test, and save it for running, which appears to be setup as required. So I run the test using:
phpunit /home/retrobadger/working_files/tutorials/phpunit/selenium1.php
But everytime I run it, I get the error below:
PHP Fatal error: Class 'PHPUnit_Extensions_SeleniumTestSuite' not found in /usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php on line 394
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP 4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/php/PHPUnit/TextUI/Command.php:150
PHP 5. ReflectionMethod->invoke() /usr/share/php/PHPUnit/Runner/BaseTestRunner.php:124
PHP 6. PHPUnit_Extensions_SeleniumTestCase::suite() /usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php:0
The file in extensions exists, and I have set very open priviledges to it. The only things I can think of are that either my SeleniumTestCase.php is faulty, or that I need to require another file no other tutorials have suggested.
Any recommendations would be greatly appreciated. I have little experience with PHPUnit so expect my mistake is a basic one.
Thanks for any advice you can give,
Dan
I've a question about load inside the web view:
I create a Json file to get Wordpress table and work well but inside the content table i can get only pure HTML code in one Line, so if i do a request from the web view to load the content like standard code i can't see the content, but only pure code with tags:
[MyWeview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:MyJsonClass.MyContentTeble ]]];
This normal code working, but not to encode HTML, how can encode the HTML directly inside the web view?
Thanks for help.
I want to know how to make expect command in expect script to wait for exact string to be matched before proceeding to next line in the script.
The code is as shown below
#!/bin/sh
#!/usr/bin/expect
spawn ssh -Y localuser@lbblr-tirumala
expect -exact "localuser@lbblr-tirumala's password: "
# replace password with ur own passwd
send "geomax45\r"
# replace the prompt with ur own prompt
expect "localuser@lbblr-tirumala:~$ "
# run application
send "./sample\r"
expect "*Menu*\r
1. print hello world\r
2. print Bye world\r
3. quit\r
enter choice: "
# enter choice 1
send "1\r"
expect "Bye world\r
*Menu*\r
1. print hello world\r
2. print Bye world\r
3. quit\r
enter choice: $"
# enter choice 2
send "2\r"
In the above code after entering 1 the code should wait for "Bye world\r......" string to occur on the screen. But even though the screen prompts different string altogether, the code is executing the mext line and entering option 2, which should not occur as per definition of expect. It should wait untill the complete string in expect command matches.
I want to know whether there is any stricter command that can be used so that expect waits until exact string matching occurs. Please help me in this issue
Does any of you can point me to some resource about video performance of AIR (3.2) on iOS devices.
I am interested into:
I am able to give image to navigation bar and also changed image of navigation bar button item. For some reason navigation bar image, i guess, overlapped over navigation bar button image. Navigation bar button is functioning right when i click on navigation bar image at left but its not displaying over navigation bar image. here is the code ;
UIImage *imagebar = [UIImage imageNamed: @"schedule-strip.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage: imagebar];
imageView.frame = CGRectMake(0, 0, 190, 44);
imageView.contentMode = UIViewContentModeScaleAspectFill;
self.navigationItem.titleView = imageView;
UIImage* image = [UIImage imageNamed:@"back-icon.png"];
CGRect frame = CGRectMake(0, 0, image.size.width, image.size.height);
UIButton* someButton = [[UIButton alloc] initWithFrame:frame];
[someButton setBackgroundImage:image forState:UIControlStateNormal];
[someButton setShowsTouchWhenHighlighted:YES];
[someButton addTarget:self action:@selector(backToMore) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem* someBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:someButton];
[self.navigationItem setLeftBarButtonItem:someBarButtonItem];
[someBarButtonItem release];
[someButton release];
help me out.
I have been comparing many chart framework, and these two are the final contenders. There is no point to compare frameworks if there are no specifications. So, I will lay down my specifications and hope to have some responses, would be valuable to people having questions on which framework they should choose.
Final Goal : Stock Chart just like Google Finance
Points of interest
1. No Flash, for mobile device compatibility
2. No Charge (HighCharts is cool if you have money)
3. Annotation on Chart, for marking events
4. Zoom in/ Zoom out
5. Multiple Y-axes
Where do you think?
I have a sql like the following in JDBC Sampler of JMeter
select id,code from table where .....
how do I extract the value of the two columns.
Lets say I have a origin server which through the act of a redirect with particular query string params needs to provide details to a target server. However, I need to ensure those details came from my origin server only.
Also I can't sure the integrity of the target server. Or specifically, the target server might be compromised so any encryption keys might have been read by a malicious party.
I'm thinking I could sign the query string using some form of public/private keypair. The origin server uses a private key to sign the string, and the target server uses a public key to verify it came from my origin server, and the message hasn't been tampered with.
I'm far from a cryptography expert or anything, so any assumption here I've made might be wrong, please correct me if so :)
I'm basically after a (hopefully) simple way to do this in Ruby.
Well, since I'm practising "the Prolog logic" today and I found this unanswered problem in another thread here, I was wondering how it works.
increment every element of list by its depth, example
increment([0,0,[0]],[1,1,[2]]) -> true
And I almost thought that I like this language... :))
Is something like that possible? Thanks.
I am trying to insert record in database
but it showing error on database conect
Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client
i am implementing a django web site,
the site goes to the hello world view:
http://ec2-107-20-20-19.compute-1.amazonaws.com/
views.py /home/ubuntu/djangoProj/micopiloto/portfolio
# Create your views here.
from django.http import HttpResponse
def view(request):
return HttpResponse('Hello Worlsss9d!')
but i cannot see the amin site,
I see this error: unable to open database file
> http://ec2-107-20-20-19.compute-1.amazonaws.com/admin/
settings.py `/home/ubuntu/djangoProj/micopiloto`
# Django settings for micopiloto project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'thadb.db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/", "/static/admin/".
ADMIN_MEDIA_PREFIX = '/static/admin/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = '2&g_&k=+^(0t)1xf82m^=#0u6v1e!)nn7ixq*+2^h%4$mwlrsm'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
ROOT_URLCONF = 'micopiloto.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'portfolio'
)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
so i see the created thadb.db
in my project folder,
i have the error:
Exception Value:
unable to open database file
so I have $sudo chmod 777 thadb.db
but still get the same error,
is this because of the permission?
should i set the folder to 777?
but i dont know how will the security be affected?
thanks!
is there a tool for generating intermediate code for java files?Or are there any resources that could help in generating one?Thanks.
Reading this question, in the first comment, @Cody Gray says:
Erm, you know that you're not supposed
to redistribute the "Debug" version,
right?
I'm concerned about it. In Visual Studio, I usually develop my applications in Debug mode, and if I need to distribute the executable, all I do is zip the .exe
and required .dll
files (in bin\Debug
folder).
Why is it a bad idea?
What is the difference between doing this and doing exactly the equivalent thing in Release mode?
Edit:
I asked this question time ago, but I just wanted to edit it to add a difference:
When using Debug.Assert
in the code to test it, and compile in Release Mode, all those lines are gone, so that could be another difference.
I am working on the XML files in C#.
I want to extact the name space and do some maniplations.
say my xml file looks like this.
<Content xmlns="http://ABCD.com/sdltridion/schemas/XXXXX">
<first>ABCD</first>
<second>DCEF</second>
</Content>
I want to extract Xml namespace from the root tag, ang get the value of XXXXX.
Output needed: XXXXX
Can any one help regarding this.
Thank you.