Is there a way to do this in C#?
So for example, if your method is called and you want to know if the caller had put the method call inside a checked block?
I am creating a event using
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
And invoking the intent using
startActivityForResult(intent, Constants.LINK_CALENDER);
There is nothing returned to call in
onActivityResult(int requestCode, int resultCode, Intent data)
It always returns data=null ie., returned intent result is always null.
I am trying to retrieve the "Done/Revert" state of calender event just created and some identity so that i can open the event again in future from elsewhere in code.
I have a GridView Control that for other functionality has to be inside an update panel. The site is using the Ajax Control Toolkit and the "EnableSortingAndPagingCallbacks" property on the Grid is set to false. However, when I execute a paging call it is still doing it as a callback instead of a postback. How do I fix this and get the paging calls to fire as a postback?
Why is it forbidden to call Extension method with ref modifier?
This one is possible:
public static void Change(ref TestClass testClass, TestClass testClass2)
{
testClass = testClass2;
}
And this one not:
public static void ChangeWithExtensionMethod(this ref TestClass testClass, TestClass testClass2)
{
testClass = testClass2;
}
But why?
Trying to inject CSS and JS files reachable through Qt resources (qrc://) through JavaScript (using this technique) which itself is injected through a evalutateJavaScript() call fails fails miserably hitting this test in QNetworkAccessFileBackend.
I can't figure how to make this work, really. I could subclass QNAFB but then I would need to subclass QNAM as well to make it instance my subclass instead of QNAFB?
hi i am integrating authorize.net AIM api into my shopping cart. i have a developer account from auth.net and i am working locally. when i do auth.net api call, i get
SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
i assume it's because i dont have ssl on my local machine. how do i get over this so i can test on my local machine? thank you
Hi, hereafter is my piece of code that I want to simplify in order to avoid passing an extra argument on each call :
module M
def do_something(context)
puts "Called from #{context}"
end
module_function :do_something
end
class Foo
def do_stuff
M.do_something(self)
end
end
Foo.new.do_stuff
Is there a way to do the same think without passing 'self' as an input argument to 'do_something' method like this ?
module M
def do_something
puts "Called from #{method that returns caller object}"
end
module_function :do_something
end
class Foo
def do_stuff
M.do_something
end
end
Foo.new.do_stuff
Thanks for your support!
I would like to put a large variable definition in a separate file for the sake of getting it out of the way. I must be doing something wrong though, because my puts call isn't putting anything out.
my_class.rb:
class foobar
def initialize
require 'datafile.rb'
puts @fat_data
end
end
datafile.rb:
@fat_data = [1,2,3,4,5,6,7,8,9,10]
Can you use require this way?
I have a problem with Flex module. I want to access url variables by this.loaderInfo.url, i call a function in createionComplete handler of module and sometimes it works and sometimes it doesn't. (Can't access... null). Any suggestions?
Hi guys, at this page:
http://torjo.com/tobias/index.html#boost_utility_singleton._usage I saw that boost has singleton class which gets second param: recreate instance if it's deleted (when we call the singleton). I can't find the implementation of this singleton in boost library. There is only singletons from serialization and pool. What's wrong?
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it?
The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if I change foo in one module, it is updated in others. I'd be fine if I could set foo before importing other modules and then they would see the same value for it.
I added some new functionality in C and when I try to build it, it gives me the following error:
libnativehelper/include/nativehelper/JNIHelp.h:116: error: undefined reference to 'jniRegisterNativeMethods' error.
I have included jnihelp.h in my C files.
Is this a makefile related issue or am I missing something?
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := newfile
LOCAL_SRC_FILES := newfile.cpp
include $(BUILD_SHARED_LIBRARY)
Hi ,
We are doing call taxi business ,
I have around 100 drivers ,
I want to track these 100 drivers , am not ready to go for GPRS and
any other costly works ,
So i want to track these guys using His mobile,
That is,
I have all these drivers mobile number,
is there a way to find his/her present location using any google API ,
Please tell me Google API for tracking mobile ,
Thanks
Bharanikumar
anybody knows how to make the jquery dialog not resizable ?
I call it like this atm :
var elem = $("#mydiv");
elem.dialog({
modal: true,
title: 'title',
buttons: {
Ok: function() {
$(this).dialog('close');
} //end function for Ok button
}//end buttons
}); // end dialog
elem.dialog('open');
I recently found that there is a command in Vim called compiler. You can call it with any common compiler (for example, :compiler gcc, :compiler php, etc.), but it doesn't seem to have any immediate effect.
I searched on the manpages but didn't find anything useful about what it actually does, nor does the Vim Wiki. Does anyone know what that command actually does?
I need to use method like:
DoSomething<(T)();
But i don't know which Type i have, only object of class Type. How can i call this method if I have only:
Type typeOfGeneric;
Hi, i would like to now how can i get the suggestion when i do a \cite in emacs-auctex. The minibuffer tells me when i do C-c [ that "No valid bibliography in this document, and no default available". So how can i set this default?, i have a separated file with my bibtex references that is call by a master document, and i want the suggestion for any of the other files included.
Sorry I'm new to Android handsets. When you do a startActivity(intent) does it involve hitting Googles cloud services at all to resolve the [handler] or is this purely a local call?
Any good CCK API docs out there? I have seen http://api.audean.com/, but can't find what I want there.
Basically, I need a function that takes a field name and returns what node type has that field. I wrote my own, but would rather make an API call.
I have a simple small question which someone who knows will be able to answer easily, I searched google but couldn't find the answer.
There are many programs running at once on a computer, and my question is: when a program loads a DLL, does it actually load the DLL file or does it find the memory in which the DLL is already loaded? For example, is ws2_32.dll (winsock 2) loaded for every program that uses winsock, or is it loaded once and all programs that use it use the same memory addresses to call the functions?
I have PL/SQL function, which is programmed to sort a set of data. This function work fine without any error, when called directly as a PL/SQL Function.
However, when I call this Function Via a Unix Shell Script, even though the script returns a success code and throws an Out Process Memory Error and function is actually not executed.
I have verified the DB Index spaces and temp spaces, which are more than 50% free spaces
I want to build a web-based knowledge base system for our call center. To save some development time, I am looking for a open source. Does anybody know any good one out there?
Thanks in advance,
Tony
I have a rather complicated xslt sheet transforming one xml format to another using templates. However, in the resulting xml, I need to have all the empty elements excluded. How is that done?
This is how the base xslt looks like:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:far="http://www.itella.com/fargo/fargogate/" xmlns:a="http://tempuri.org/XMLSchema.xsd" xmlns:p="http://tempuri.org/XMLSchema.xsd">
<xsl:import href="TransportCDMtoFDM_V0.6.xsl"/>
<xsl:import href="ConsignmentCDMtoFDM_V0.6.xsl"/>
<xsl:template match="/">
<InboundFargoMessage>
<EdiSender>
<xsl:value-of select="TransportInformationMessage/SenderId"/>
</EdiSender>
<EdiReceiver>
<xsl:value-of select="TransportInformationMessage/RecipientId"/>
</EdiReceiver>
<EdiSource>
<xsl:value-of select="TransportInformationMessage/Waybill/Parties/Consignor/Id"/>
</EdiSource>
<EdiDestination>FARGO</EdiDestination>
<Transportations>
<xsl:for-each select="TransportInformationMessage/TransportUnits/TransportUnit">
<xsl:call-template name="transport"/>
</xsl:for-each>
<xsl:for-each select="TransportInformationMessage/Waybill/TransportUnits/TransportUnit">
<xsl:call-template name="transport"/>
</xsl:for-each>
<xsl:for-each select="TransportInformationMessage/Waybill">
<EdiImportTransportationDTO>
<Consignments>
<xsl:for-each select="Shipments/Shipment">
<xsl:call-template name="consignment"/>
</xsl:for-each>
</Consignments>
<EdiTerminalDepartureTime>
<xsl:value-of select="DatesAndTimes/EstimatedDepartureDateTime"/>
<xsl:value-of select="DatesAndTimes/DepartureDateTime"/>
</EdiTerminalDepartureTime>
<EdiAgentTerminalArrivalDate>
<xsl:value-of select="DatesAndTimes/EstimatedArrivalDateTime"/>
<xsl:value-of select="DatesAndTimes/ArrivalDateTime"/>
</EdiAgentTerminalArrivalDate>
<EdiActivevehicle>
<xsl:value-of select="Vehicle/TransportShiftNumber"/>
</EdiActivevehicle>
<EdiConveyerZipCodeTown><xsl:text> </xsl:text></EdiConveyerZipCodeTown>
</EdiImportTransportationDTO>
</xsl:for-each>
</Transportations>
</InboundFargoMessage>
</xsl:template>
</xsl:stylesheet>
What needs to be added, so that empty elements are left out?
For example, a snippet from the resulting xml:
<?xml version="1.0" encoding="UTF-8"?>
<InboundFargoMessage xmlns:p="http://tempuri.org/XMLSchema.xsd"
xmlns:far="http://www.itella.com/fargo/fargogate/"
xmlns:a="http://tempuri.org/XMLSchema.xsd">
<EdiSender>XXXX</EdiSender>
<EdiReceiver>YYYY</EdiReceiver>
<EdiSource>TR/BAL/IST</EdiSource>
<EdiDestination>FARGO</EdiDestination>
<Transportations>
<EdiImportTransportationDTO>
<Consignments>
<EdiImportConsignmentDTO>
<ConsignmentLines>
<EdiImportConsignmentLineDTO>
<DangerousGoodsItems>
<EdiImportDangerGoodsItemDTO>
<EdiKolliTypeOuter/>
<EdiKolliTypeInner/>
<EdiTechnicalDescription/>
<EdiUNno/>
<EdiClass/>
<EdiDangerFactor/>
<EdiEmergencyTemperature/>
</EdiImportDangerGoodsItemDTO>
</DangerousGoodsItems>
<BarCodes>
<EdiImportConsignmentLineBarcodeDTO/>
</BarCodes>
<EdiNumberOfPieces>00000002</EdiNumberOfPieces>
<EdiGrossWeight>0.000</EdiGrossWeight>
<EdiHeight/>
<EdiWidth/>
<EdiLength/>
<EdiGoodsDescription/>
<EdiMarkingAndNumber/>
<EdiKolliType>road</EdiKolliType>
<EdiCbm/>
<EdiLdm/>
</EdiImportConsignmentLineDTO>
That really needs to be:
<?xml version="1.0" encoding="UTF-8"?>
<InboundFargoMessage xmlns:p="http://tempuri.org/XMLSchema.xsd"
xmlns:far="http://www.itella.com/fargo/fargogate/"
xmlns:a="http://tempuri.org/XMLSchema.xsd">
<EdiSender>XXXX</EdiSender>
<EdiReceiver>YYYY</EdiReceiver>
<EdiSource>TR/BAL/IST</EdiSource>
<EdiDestination>FARGO</EdiDestination>
<Transportations>
<EdiImportTransportationDTO>
<Consignments>
<EdiImportConsignmentDTO>
<ConsignmentLines>
<EdiImportConsignmentLineDTO>
<DangerousGoodsItems/>
<BarCodes/>
<EdiNumberOfPieces>00000002</EdiNumberOfPieces>
<EdiGrossWeight>0.000</EdiGrossWeight>
<EdiKolliType>road</EdiKolliType>
</EdiImportConsignmentLineDTO>
In other words: Empty elements should be left out.