If I don't care about less than seconds, what should be the recommended type to store my datetime values in sql-server 2005, is it datetime or smalldatetime or else?
I am trying to send the output from the find command to OpenSSL in order to find out when certificates expire.
This finds the files
find . -name \*.pem -type f
This generates the cert info I want
openssl x509 -in certname.pem -noout -enddate
Can I merge these two?
Thanks for your help.
Hi All
I created a performance counter for my C# application. Its type is NumberOfItems32.
I don't know why but the Performance Monitor is displaying me on the y-axis only as maximum value only 100 when my counter is much more bigger than this for sure.
Do you know if this is the correct behavior or am I doing something wrong?
Thanks all
AFG
Is there a way I could declare a variable of type HashMap which would call some java method to populate the HashMap?
I want to have a hashmap in a report so depending on what the value of a certain field is, I would like to get the full description of it from an Hashmap.
Hello,
I have a button skin in spark created in Catalyst. Now I want to apply this skin to my project of type ActionScript project. When I add a simple spark button to my sprite then it's not showing there.
Can anyone help me to figure out how to add a Spark.Button in a Sprite?
Best Regards
Im attempting to make use of dependency injection in Jboss AS 7 and im having huge difficulties.
I have setup a EAR which contains both a EJB jar and a war.
The war contains a richfaces web app.
Im attempting to inject an EJB from the ejb jar into a faces managed bean with the code below :
public class UserController {
@EJB(mappedName="UserService")
private UserFacadeService userService;
public String getService(){
if(userService == null){
however when i deploy jboss puts the error in the console :
rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"GoodByeJohnEAR.ear\".\"GoodByeJohnWeb-1.0-SNAPSHOT.war\".component.\"managed-bean.za.co.gbj.UserController\".START missing [ jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".\"env/za.co.gbj.UserController/userService\" ]","jboss.deployment.subunit.\"GoodByeJohnEAR.ear\".\"GoodByeJohnWeb-1.0-SNAPSHOT.war\".jndiDependencyService missing [ jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".\"env/za.co.gbj.UserController/userService\" ]","jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".\"env/za.co.gbj.UserController/userService\".jboss.deployment.subunit.\"GoodByeJohnEAR.ear\".\"GoodByeJohnWeb-1.0-SNAPSHOT.war\".module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".2 missing [ jboss.naming.context.java.module.GoodByeJohnEAR.\"GoodByeJohnWeb-1.0-SNAPSHOT\".env/UserService ]"]}
09:03:50,576 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "GoodByeJohnEAR.ear"
09:03:50,670 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "GoodByeJohnWeb-1.0-SNAPSHOT.war"
09:03:50,670 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) Starting deployment of "GoodByeJohnEJB-1.0-SNAPSHOT.jar"
09:03:51,367 WARN [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-2) Encountered invalid class name "com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor" for service type "com.sun.faces.spi.injectionprovider"
09:03:51,367 WARN [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-2) Encountered invalid class name "com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection" for service type "com.sun.faces.spi.injectionprovider"
09:03:51,375 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-8) JNDI bindings for session bean named UserFacadeBean in deployment unit subdeployment "GoodByeJohnEJB-1.0-SNAPSHOT.jar" of deployment "GoodByeJohnEAR.ear" are as follows:
java:global/GoodByeJohnEAR/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService
java:app/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService
java:module/UserFacadeBean!za.co.gbj.UserFacadeService
java:global/GoodByeJohnEAR/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean
java:app/GoodByeJohnEJB-1.0-SNAPSHOT/UserFacadeBean
java:module/UserFacadeBean
09:03:51,406 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named UserFacadeBean in deployment unit subdeployment "GoodByeJohnWeb-1.0-SNAPSHOT.war" of deployment "GoodByeJohnEAR.ear" are as follows:
java:global/GoodByeJohnEAR/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService
java:app/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean!za.co.gbj.UserFacadeService
java:module/UserFacadeBean!za.co.gbj.UserFacadeService
java:global/GoodByeJohnEAR/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean
java:app/GoodByeJohnWeb-1.0-SNAPSHOT/UserFacadeBean
java:module/UserFacadeBean
09:03:51,577 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) Service status report
New missing/unsatisfied dependencies:
service jboss.naming.context.java.module.GoodByeJohnEAR."GoodByeJohnWeb-1.0-SNAPSHOT".env/UserService (missing)
service jboss.naming.context.java.module.GoodByeJohnEAR."GoodByeJohnWeb-1.0-SNAPSHOT"."env/za.co.gbj.UserController/userService" (missing)
Please assist!
I got $2 change instead of $3 today and that got me thinking about short for some reason. What can do (these days ;-p) with a variable of the short primitive type (16 bits signed)? Any good reason to keep them around?
I have some code, which generates this warning in several places. I want to fix them, but I do not know where they are because the C# compiler does not report the line of the error (there is an open MS Connect issue for that).
Is there a tool, which can tell me where is the problematic code? IL level tool is fine, known the method name and declaring type is good enough.
Hi guys
Just a quick one.
In IOC's what does ResolveAll do?? I know that the offical answer is "Resolve all valid components that match this type." but does that mean that it will return any class that implements a given interface?
Cheers
Anthony
Hi
What's a cool taskbar/system tray notifier approach? To get that latest cool looking sliding windows type notifications can I stay WinForms, or do I need to go WFP? Which control/class/framework should I look at?
Basically after a more fresher:modern looking UI than the old winforms popular bubbles etc
Hi, I have two dataset from different server.
I have result like that
(if image doesn't work my data)
The problem is at last, i've got only the result from the first table like that
And i would like to have all the result for different job type like that
asset job jan feb mar ...
5000 acc 10 11 12
5000 over 10 11 12
The problem is not solve with a right join because it's the same problem
Could you help me?
Thank
Ju
Hi everyone,
I have the following problem, and searched for a while but haven't got any solution from the net:
I have a custom list view, each item has the following layout (I just post the essential):
<LinearLayout>
<ImageView android:id="@+id/friendlist_iv_avatar" />
<TextView andorid:id="@+id/friendlist_tv_nick_name" />
<ImageView android:id="@+id/friendlist_iv_status_icon" />
</LinearLayout>
And I have a class FriendRowItem, which is inflated from the above layout:
public class FriendRowItem extends LinearLayout{
private ImageView ivAvatar;
private ImageView ivStatusIcon;
private TextView tvNickName;
public FriendRowItem(Context context) {
super(context);
RelativeLayout friendRow = (RelativeLayout) Helpers.inflate(context, R.layout.friendlist_row);
this.addView(friendRow);
ivAvatar = (ImageView)findViewById(R.id.friendlist_iv_avatar);
ivStatusIcon = (ImageView)findViewById(R.id.friendlist_iv_status_icon);
tvNickName = (TextView)findViewById(R.id.friendlist_tv_nick_name);
}
public void setPropeties(Friend friend) {
//Avatar
ivAvatar.setImageResource(friend.getAvatar().getDrawableResourceId());
//Status
Status.Type status = friend.getStatusType();
if ( status == Type.ONLINE) {
ivStatusIcon.setImageResource(R.drawable.online_icon);
} else {
ivStatusIcon.setImageResource(R.drawable.offline_icon);
}
//Nickname
String name = friend.getChatID();
if ( friend.hasName()) {
name = friend.getName();
}
tvNickName.setText(name);
}
}
In the main activity, I have a custom listview: lvMainListView, with an custom adapter (whose class extends ArrayAdapter - and off course: override the method getView ), the data set of the adapter is: ArrayList<Friend> friends:
private class FriendRowAdapter extends ArrayAdapter<Friend> {
public FriendRowAdapter(Context applicationContext, int friendlistRow,
ArrayList<Friend> friends) {
super(applicationContext, friendlistRow, friends);
}
@Override
public View getView(int position,View convertView,ViewGroup parent) {
Friend friend = getItem(position);
FriendRowItem row = (FriendRowItem) convertView;
if ( row == null ) {
row = new FriendRowItem(ShowFriendsList.this.getApplicationContext());
}
row.setPropeties( friend );
return row;
}
}
the problem is when I change the status of a friend from OFFLINE to ONLINE, then call notifyDataSetChanged(), nothing happens : the status icon of that friend doesn't change.
I tried debugging, and saw the code: notifyDataSetChanged() get called, but the custom getView() is not fired !
Can you please tell me, that is normal in Android, or did I do something wrong ? (I am using Android 1.5).
Thank you in advance,
Son
Hi,
How can I implement an autocomplete using redis?
Say for example I have an array ["alfred","joel","jeff","addick"]. When I type a I get ["alfred", "addick"]
I hope you get the point. How can I implement this using redis commands efficiently(if possible but I think it is). It would be great if I could get some simple commands I can try out via telnet to mimic this behaviour.
Thanks
P.S: Merry x-mas to all of you :)
I have a developer license and I've generated .mobileprovision and .cer files. I've put the provision file on my device, double-clicked the .cer file and added it to the login keychain. But when I'm trying to build the app in XCode, I get the error:
CodeSign error: code signing is required for product type 'Application' in SDK 'Device - iPhone OS 3.1.3'
What am I doing wrong? Thanks in advance!
I'm new to core data and try to get all children objects of various types with one query. Say there's an "Animal" type as parent and "Cat", "Dog" and "Bird" as children. I'd like to get both cats and dogs, but not Birds in single query returned as Animal objects. Is it possible?
Hi - I'm trying to capture the value that's throwing a uniqueness error (or for that matter, any other type of built-in validation) to display it in the :message option. Here's what I tried (didn't work)
# inside the model
validate_uniqueness_of :name, :message => "#{name} has already been taken" # also tried using #{:name}
I could use a custom validation, but this beats the point of using something that's already integrated into AR. Any thoughts? thanks.
Hi,
Not really a coding question more a little help with my idea of a Relational database.
If I have 3 tables in a SQL database. In my php script I basically query the companies which are in industry "a" and then insert a row into a separate table with their details such as companyId , companyName etc is that a type of Relational database ?
I have explained it in a simple way so we don't get confused what I am trying to say.
The setup:
I have a project that is using CouchDB. The documents will have a field called "tags". This "tags" field is an array of strings (e.g., "tags":["tag1","tag2","etc"]). I am using couchdb-lucene as my search provider.
The question:
What function can be used to get couchdb-lucene to index the elements of "tags"?
If you have an idea but no test environment, type it out, I'll try it and give the result here.
When i use ObjectContext.Translate(DbDataReader) to materialize my own Entity which use ComplexType as property. I encounter this error:
System.InvalidOperationException: Cannot create a value for property '[MyOwnAttribute]' of type '[MyOwnComplexType]'. Only properties with primitive types are supported.
Does EntityFramework Support ComplexType Translate?
Or i missed something?
Hi,
I can launch some remote control by using:
ant launch-remote-control
but I dont know how my script connect to hub?
I set up ant, selenium-grid on the same computer.
I have an grid.dll which is written by C# and run through NUnit.
The test data is read from xml file (ValidData.xml)
The example code is below :
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System;
using System.Xml;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
using Selenium;
namespace Grid
{
public class Class1
{
//User defined
private string strURL = "http://gmail.com/";
private string[] strBrowser = new string[3] { "*iehta", "*firefox", "*safari" };
string hubAddress = "192.168.20.131"; // IP of my computer
// System defined
private ISelenium selenium;
private StringBuilder verificationErrors;
[SetUp]
public void SetupTest()
{
selenium = new DefaultSelenium(hubAddress, 4444, this.strBrowser[1], this.strURL);// do i need to identify browser when I defined it when launching a remote control
selenium.Start();
verificationErrors = new StringBuilder();
}
[TearDown]
public void TeardownTest()
{
try
{
selenium.Stop();
}
catch (Exception)
{
// Ignore errors if unable to close the browser
}
Assert.AreEqual("", verificationErrors.ToString());
}
private string[] name;
[Test]
public void LoginPassedTest()
{
try
{
XmlDocument doc = new XmlDocument();
XmlNode docNode;
doc.Load("ValidData.xml");
docNode = doc["TestCase"];
foreach (XmlNode node in docNode)
{
selenium.Open("/");
selenium.WaitForPageToLoad("50000");
selenium.Type("Email", node["username"].InnerText);
selenium.Type("Passwd", node["password"].InnerText);
selenium.Click("signIn");
selenium.WaitForPageToLoad("100000");
name = (selenium.GetText("//div[@id='guser']/nobr/b").Split('@'));
try
{
Assert.AreEqual(node["username"].InnerText, name[0]);
Assert.AreEqual("Sign out", selenium.GetText(":r6"));
}
catch (AssertionException e)
{
verificationErrors.Append(e.Message);
}
selenium.Click(":r6");
}
}
catch (AssertionException e)
{
verificationErrors.Append(e.Message);
}
}
}
}
Step I run this script:
1.I build that script into DLL
2.I start hub by using command "ant lauch-hub"
3.I start 2 remote controls by using command :
ant -Dport=5566 -Denvironment="*chrome" launch-remote-control
ant -Dport=5577 -Denvironment="*iexplore" launch-remote-control
4.Then I open Nunit and load DLL (code above) and run
5.The NUNit doesnot respond anything.
I think there are some missing things but I dont know.
How can the test script (DLL) know which is sequence of remote control is selected to run the test????
Please help me!!
Thank you so much
Yui.
I'm deploying an example SQL CLR stored procedure which has a SQL CLR type as parameter using Visual Studio 2008 and menu Project -> Deploy.
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void TakeTariff(TariffInfo tariffInfo) { }
}
public class TariffInfo
{
public SqlDecimal Amount { get; private set; }
}
but getting next strange error:
The default schema does not exist.
How can I fix that?
My user was created this way:
CREATE USER myUser FOR LOGIN myLogin_mod WITH DEFAULT_SCHEMA = mySchema
I have been using SmartGWT but have run into trouble mixing SmartGWT with other frameworks such as Wicket. Infact it has been a bit of a disaster and I regret going with it in the first place.
I do not want this question to turn into any type of flame war, so therefore would just like people to list alternatives and their experience with those alternatives.
I would like to change the formatting on my BASH prompt from this:
[email protected]:~/some/very/annoying/long/path$
to something like this:
[email protected]:~/some/very/annoying/long/path
$
The idea is that I would be able to type a reasonably long command on one line without it wrapping to the next line so quickly.
Hey there,
I'm trying to find a free downloadable dictionary (or Corpus might be the better word) which I can import into MySQL. I need to words to have the type (noun, verb, adjective) associated with them. Any tips on where I can find one? I found one several years ago that worked nicely, but I no longer have it around.
Thanks!
Chris