I have read a number of articles on how to configure mirroring on SQL Server 2012. I went through the steps and everything worked until hitting the final step, which didn't work. When I run this on the Principal: ALTER DATABASE MyDBName SET PARTNER = 'TCP://1.2.3.4:5022'; I get this error: The server network address "TCP://1.2.3.4:5022" can not be reached or does not exist. When I run the counterpart ALTER statement shown above, but on the Mirror, it works fine. I have tried all the steps in this troubleshooting article. Important points: The Primary and Mirror servers are in different datacen
SOLVED, solution is underneath. I want to replace buttons for navigation in webview to 2 swipe gestures - left and right swipe. This Android: How to handle right to left swipe gestures link really helped me, but I encountered problem - after implementing this code I was unable to click on links/ or scroll through loaded webpage in webview activity(I have used 1st answer from possible answers). Then I found out that in another answer in this question is something similar - how to scroll in listview - https://stackoverflow.com/a/20005481/3272449, but I wasn't able to get it running. In logcat i
I have been looking for a way in which I can map two split files into an online player. For example if I have .mp4.001 file and .mp4.002 file in one folder VLC media player automatically finds all the connected files in the same folder and plays a complete uninterrupted video. Now what I want is an online player ofcourse in HTML5 in which I can map all the files which are in different locations. eg. src=http://www.xxx.xxx/abc.mp4.001 src=http://www.xys.xxx/abc.mp4.002 src=http://www.xyz.xxx/abc.mp4.003 I was not able to find any player also I am not sure if this is possible. Kindly help.
I'm making RESTful API using Tastypie, and when I try to POST/PUT/DELETE a request it says: "detail": "CSRF Failed: CSRF token missing or incorrect.". It works fine with GET. I've read various threads on SO, saying: to delete the cookies or use @csrf_exempt or use @method_decorator(csrf_exempt) but neither of it worked. How can I over-pass this error? views.py class SnippetList(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView): queryset = Snippet.objects.all() serializer_class = SnippetSerializer def get(self, request, *args, **kwargs): return self.list(request, *args, *
I was given the task of producing high-level design documents, describing flows of a new development project. The project's specifications contains a few flow-charts of the project's use cases. These tend to be packed with data, including branches (decisions that determine multiple paths) and loops (flows that return to a previous state). Attempting to describe these using traditional sequence diagrams hit a well, as (to me) it seems that these are better used for things that are more "single direction" in their nature, with no control flows, etc. What is the optimal way of creating high-level
I have a string containing an integer (which has been read from a file). I'm trying to convert the string to an int using strconv.ParseInt(). ParseInt requires that I provide a bitsize (bit sizes 0, 8, 16, 32, and 64 correspond to int, int8, int16, int32, and int64). The integer read from the file is small (i.e. it should fit in a normal int). If I pass a bitsize of 0, however, I get a result of type int64 (presumably because I'm running on a 64-bit OS). Why is this happening? How do I just get a normal int? (If someone has a quick primer on when and why I should use the different int types, t
I have a set of icons that transition from the center of the page to a set point, and then remain there. What I want to do is set them to transition to have a thicker border and scale to 130x130px whenever I mouse over one of them, but only the initial animation occurs CSS: .iconborder { border-width: 5px; border-style: solid; border-radius: 100em; border-color: white; } .iconborder:hover {animation-name: icongrow; animation-duration: 0.2s; animation-timing-function: cubic-bezier;} @keyframes icongrow { 0% { border-width: 5px; width: 100px; height: 100px; } 100% { border-width: 10px; width: 13
According to this post, manually-entered APNs are contained here: /data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml However, this file can't be accessed using adb shell cat or adb pull. Is there any workaround for a non-rooted device?
What would be an example of how to set up an ARM9 interrupt vector table using C or inline assembly in a bare-metal environment without any RTOS or Linux OS? Specifically, how can I use inline assembly or C to set branches to my IRQ interrupt handler ISR coded in C? /// timer1 64-bit mode interrupt handler connected to TINT2 interrupt=#34 /// \todo I think I need to ACK it once I get working interrupt void interruptHandlerTimer1(void) { printf("\n [* ISR *] \n"); // ACK TINT2 interrupt #34 AINTC ->IRQ1 = 1 << (34 - 32); } void main(void) { TIMER1 ->TCR = 0x00000000; // TGCR: TIMMODE=0 64-bit G
I am receiving this warning when running an Ant build script (Ant 1.8.2, Java 1.6). [javac] warning: Implicitly compiled files were not subject to annotation processing. [javac] Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation. [javac] 1 warning Adding <compilerarg value="implicit" /> produces: [javac] error: Class names, 'implicit', are only accepted if annotation processing is explicitly requested [javac] 1 error Adding <compilerarg value="proc:none" /> produces: [javac] javac: invalid flag: proc:none [javac] Usage: javac <options> <so
I am trying to create a very simple code to open an application from another application. The code used is as follows , android.app.Activity import; android.content.Context import; android.content.Intent import; android.content.pm.PackageManager import; public static void LaunchApplication() { GetPackageManager PackageManager = PackageManager(); startActivity(packageManager.getLaunchIntentForPackage("antay.cfsatv30localization")); } ... but when I compile I get the following errors: Error returned: src\antay\startandstopapp\wdgen\GWDCPCOL_GlobalProcedures.java:106: error: cannot find symbol ge
I have read that the performance of the CTE/with is in some cases much better than joins. However, when joining on varchars I saw a great improvement in speed when I replaced a join with a with. With tables Customer, CustomerNickname and Address where name and originalname are varchars I would normally use the following: select * from Customer c inner join Address a on c.addressid = a.id left join CustomerNickname cn on cn.originalname = c.name If those tables have a lot of data, performance will be bad because of the varchar join. However, with the following, performance will improve from a m
i have variable x that undergoes a random walk according to the following rules: x(t+1)=x(t)-1; probability p=0.3 x(t+1)=x(t)-2; probability q=0.2 x(t+1)=x(t)+1; probability p=0.5 a) i have to create this variable initialized at zero and write a for loop for 100 steps and that runs 10000 times storing each final value in xfinal b) i have to plot a probability distribution of xfinal (a histogram) choosing a bin size and normalization!!* i have to report the mean and variance of xfinal c) i have to recreate the distribution by application of the central limit theorem and plot the probability dis
The assignment: Draw a structured flowchart and write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The process continues until the player guesses the correct number. My pseudocode: Start Num1=6 Get Num2 while Num2 is not = to Num1 if Num2 > Num1 print "too high" else print "too low" endif Get Num2 endwhile Stop
I am trying to post messages automatically to my Tumblr Blog (which will run daily via Cron) I am using the Official Tumblr PHP library here: https://github.com/tumblr/tumblr.php And using the Authentication method detailed here : https://github.com/tumblr/tumblr.php/wiki/Authentication (or parts of this, as I don't need user input!) I have the below code require_once('vendor/autoload.php'); // some variables that will be pretttty useful $consumerKey = 'MY-CONSUMER-KEY'; $consumerSecret = 'MY-CONSUMER-SECRET'; $client = new Tumblr\API\Client($consumerKey, $consumerSecret); $requestHandler = $c
I have Bash script that takes in a KERNEL device name as an argument and outputs a new string that can be used as the new KERNEL device name. Example: bash myScript sda Output: sdaa I use custom udev rules for this purpose. I am not sure how to pass an argument into a Bash script and catch the resultant output using udev rules. Here are some of the rules I have tried, KERNEL=="sda", RUN+="/bin/bash /etc/udev/myScript '%E{KERNEL}'", NAME="%c" KERNEL=="sda", IMPORT{program}="/bin/bash /etc/udev/myScript --export %k", NAME="%c" KERNEL=="sda", IMPORT{program}="/bin/bash /etc/udev/myScript --import
I have a five node cluster, three nodes of which contain DataNodes and TaskTrackers. I've imported around 10million rows from Oracle via Sqoop and process it via MapReduce in an Oozie workflow. The MapReduce job takes about 30 minutes and is only using one reducer. Edit - If I run the MapReduce code on its own, separate from Oozie, the job.setNumReduceTasks(4) correctly establishes 4 reducers. I have tried the following methods to manually set the number of reducers to four, with no success: In Oozie, set the following property in the tag of the map reduce node: <property><name>mapred.reduce.t
I'm working with Spring's WebServiceTemplate.marshalSendAndReceive(Object, WebServiceMessageCallback) method and I'm having great difficulty understanding how to handle errors properly. Right now I'm calling a SOAP service that will respond with the following message if an error has occurred internally if someone used the same unique identifier. <SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Fault> <faultcode>BEA-380001</faultcode> <faultstring>Internal Server Error</faultstring> <detail> <ns0:Fault xmlns:ns0="http://www.package.com/CommonEntities/V2" xmln
I have a table articles with 500k rows. An article has a list of authors. I am trying to create a query to get the latest published article for a list of authors. I used the following HQL query which gets me what i want but runs pretty slow (~4s) select author, article from Article article inner join article.authors author where (author.id, article.publishedAt) in (select author.id, max(article.publishedAt) from Article article join article.authors author where author.id in (authors_list)) group by author.id A possible better query in plain sql would be: select * from ( select articles.id, aut
I was following the tutorial mentioned at this this site: http://gaut.am/making-an-ocr-android-app-using-tesseract/ First I imported Tess-Two from github: https://github.com/rmtheis/tess-two And linked it to my project https://github.com/GautamGupta/Simple-Android-OCR The app compiles and runs fine. But after clicking an image when I hit save it crashes. Here is the source main activity: public class SimpleAndroidOCRActivity extends Activity { public static final String PACKAGE_NAME = "com.datumdroid.android.ocr.simple"; public static final String DATA_PATH = Environment .getExternalStorageDir
Currently working on selenium webdriver. I have created a log file and the log information stored in logfile.log. when i start running my test case the log information is captured but the entire history is visible. i want to clear the log file or it need to be cleared before starting the execution of test cases. Sample log info: 2013-10-01 09:18:06,655 INFO [TEST] Initializing Selenium... 2013-10-01 09:18:06,686 INFO [TEST] Selenium instance started 2013-10-01 09:18:11,905 INFO [TEST] ______________________________________________________________ 2013-10-01 09:18:11,905 INFO [TEST] Initializin
Hi I am new to JBoss and trying to deploy my web application in JBoss EAP 6. The deployment is successful and while trying to access the application I am getting the below exception. I am using logback and slf4j for logging in my application. Can anyone help me find a solution for this 12:04:12,846 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started in 37270ms - Started 185 of 245 services (59 services are passive or on-demand) 12:19:32,799 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SynergyClient].[jsp]]
I would like to make it so, by a click of a button, there is a popup message. Right now the popup comes as soon as I open the app. BTW the button I want to trigger the popup is the about button in main.xml Here is my main.xml (with the layout stuff): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#3DE400" android:orientation="vertical" > <!-- background originally #d78a00 --> <TextView android:id="@+id/title" android:
I'm creating an application to attach scanned documents at SAP documents, but I have some problems with that process. I'm using SAP BO 9 PL8 and found the next problems: When I try to add a new attachment line in a existing attachment (using the attachments2 object) with the update method, the DI try to check older lines, and it's possible that the file not exists in the original source path. So, update method reports an error. I use the code below: Attachments2 oAtt = oCompany.GetBusinessObject(BoObjectTypes.oAttachments2); if (oAtt.GetByKey(doc.AttachmentEntry)) { oAtt.Lines.Add(); oAtt.Line
I'm using os.rename() to try to move pdf files between drives. Attempting this I receive the error: OSError: [WinError 17] The system cannot move the file to a different disk drive Is anyone aware of a function which contains similar functionality to os.rename and allows for across disk file transfer?
I am having issues showing up or hiding a Panel on a button click. By default the panel is hidden but I want the panel to show up once the button is clicked and it is not working for me now. The only time the panel shows up is when another post-back occurs, like when I select drop down and that triggers a post-back then my panel will show up. I think the issue is that I am using an UpdatePanel and which is only doing a partial post back. Here is the code where I am using AsyncPostBackTrigger for my control (Button). <div id="dvGrid" style="padding: 10px; width: 876px"> <asp:UpdatePanel ID="Upd
In my user control has panel and panel has ddlType and txtOthers as text box controls, initially txtOthers is in visible false . when user select in ddlType and its value (1,2,3,4,5 and 6) is equal to 6 , and the txtOthers make visible true else false. I want to done this using JavaScript with IE8 to avoid postback. any help!. if (ddlType.value==6) txtOthers.Visible=true; else txtOthers.Visible=false; I have tried like above code, by default the control in in-visible so javascript can not identify the control. But , by default the control make visible false.