2018-10-22         Hilary

How to print '*' without spaces?

How can i print '*' without spaces? Here is simple ruby on rails code. And it prints it with spaces like in image: image<% 5.times do %> <%= "*" %><% end %> Just do use String#* method.<%= "*" * 5 %>Note: If you write the code in one line <% 5.times do %><%= "*" %><% end %>, it also prints * without in between spaces. [XXX]

 html                     1 answers                     65 view
 2018-10-22         Hilary

Square transaction API card tender does not return card expiration date

I'm using the square api sandbox to charge nonce and charge customer profile.when I charge nonce all the card details : last four, card brand are included in the response except for the expiration date.Tender[0].CardDetails.Card.ExpMonth and ExpYear is nullwhen I charge profile the same fields return data is this going to be the case in production? is there a way to get this information? The information will be a part of the Charge response if it was for a card on file (using customer_id and customer_card_id). If you just call Charge using a card_nonce rather than a card...

 square-connect                     1 answers                     36 view
 2018-10-22         Hilary

Check if users in a csv are part of an email group

I have a csv of SamAccountNames that I need to check are in a certain group. So far I have this:Import-Module ActiveDirectory$users = Import-Csv -path C:\path\to\csv$group = "groupname"$members = Get-ADGroupMember -Identity $group -Recursive | Select -ExpandProperty SamAccountNameForEach ($user in $users) { If ($members -contains $user) { Write-Host $user } Else { Write-Host "Not in group" }}The output is only giving me "Not in group" for every entry even though I know there are some. The Import-Csv cmdlet outputs custom objects whose...

 powershell                     1 answers                     68 view
 2018-10-22         Hilary

Problems with converting datetime to string in Django

I can't understand why this isn't working because in a Python console it works fine for me...class Activity(models.Model): id = models.CharField(max_length=250, primary_key=True) description = models.CharField(max_length=255, null=False, help_text="Brief description of the activity") start = models.DateTimeField(default=timezone.now, verbose_name="Planned start date/time", blank=True) end = models.DateTimeField(default=timezone.now, verbose_name="Planned completion date/time", blank=True) class Meta: verbose_name_plural = 'Activities' def save(self,...

 django                     1 answers                     95 view
 2018-10-22         Hilary

Algorithmic Notation - O(n+m)

This question already has an answer here: Comparing complexity of O(n+m) and O(max(n,m)) 3 answers As Dukeling correctly pointed out, the two notations are equal, however sometimes it will be more intuitive and (may) convey more information to use the notation O(n+m). [XXX]

 algorithm                     1 answers                     38 view
 2018-10-22         Hilary

Multi-dimensional np.argmax?

I've got a 3D array of shape (n, n, g) and I'd need for every (n, n) the argmax, i.e. the result should be two index vectors (x, y) of length g each.The intuitive solution would be:array = np.random.uniform(size=[5, 5, 1000])np.argmax(array, axis=[0, 1])However, numpy does not support multiple axes as argument.Is there a solution to get this result anyways? It seems you are looking to get two-dimensional (row,column) argmax indices for each flattened version of 2D slice with the first two axes merged/combined as to speak. So, the first block would be array[:,:,0] and so ...

 arrays                     5 answers                     41 view
 2018-10-22         Hilary

SecurityContextLogoutHandler clearing Authentication even if set to 'false'

I'm currently trying to implement a logout mechanism for our application in Spring Boot 2 with Spring Security.My logout configuration for spring security is:http .logout() .logoutRequestMatcher(new AntPathRequestMatcher("/logout.html")) .logoutSuccessHandler(logoutSuccessHandler) .addLogoutHandler(handler1) .addLogoutHandler(handler2) .clearAuthentication(false);With this configuration Spring adds both handlers to the LogoutFilter along with Spring's own SecurityContextLogoutHandler as the last handler in the handler's chain.The problem we are facing is t...

 java                     1 answers                     8 view
 2018-10-22         Hilary

Unable to enable a button in Activity after custom adapter Edit text afterTextChanged()

Within this project MainFragment, Custom Adapter classes are used for load listview. The adapter items are populated from a bean class named 'PayMode'. In that adapter there are four 'TextView' and one 'EditText (allocatedAmt)'. That 'EditText' is not populated from that bean class. AfterTextChanged on that 'Edittext' Logcat is properly display the text 'editable.toString()'.Now I need to enable a button (in MainFragment) afterTextChanged listner for that 'Edittext(allocatedAmt)' in adapter. Below is my code. Adapter.javapublic class PayModeAdapter extends ArrayAdapter<P...

 android                     1 answers                     43 view
 2018-10-22         Hilary

Java 8: how to 'JOIN' two Maps having the same Keys?

This question already has an answer here: Join two maps by key 3 answers Use Collectors.toMap:Map<Long,Long> realIDsByTempMap = tempIDsMap.entrySet() .stream() .collect(Collectors.toMap(Map.Entry::getValue, e -> realIDsMap.get(e.getKey()))); [XXX]

 java                     1 answers                     18 view
 2018-10-22         Hilary

TSQL: Return row(s) with earliest dates

Given 2 tables called "table1" and "table1_hist" that structurally resemble this:TABLE1id status date_this_status1 open 2008-12-122 closed 2009-01-013 pending 2009-05-054 pending 2009-05-065 open 2009-06-01TABLE1_histid status date_this_status2 open 2008-12-242 pending 2008-12-263 open 2009-04-244 open 2009-05-04With table1 being the current status and table1_hist being a history table of table1, how can I return the rows for each id that has the earliest date. In other words, for each id, I need to know it's earliest status and date.E...

 sql                     7 answers                     33 view
 2018-10-22         Hilary

Receiving a 429 error when trying to create a storage account during ARM deploy

Reciving this error when trying to deploy to a recently deleted resource group.Have left this running for 40 minutes but it never clears. When i use a completley newly named resource group this doesnt happen.In my ARM template I create this storage account before i try and create the serverfarm associated with it. Any help would be very grateful, i can also repeat this with the same resource group. OPERATION ID90AB707C6611418B TRACKING ID67c301c6-93a6-4372-98bf-5bfe60f7df5f STATUS429 PROVISIONING STATERunning TIMESTAMP29/08/2018, 12:16:59 DURATION37 seconds TYPEMicrosoft....

 azure-resource-manager                     1 answers                     71 view
 2018-10-22         Hilary

I want to Update Sql Server Database How to add columns or table in SQL Server database threw a VB.net Application

I want to Update Sql Server Database How to add columns or table in SQL Server database threw a VB.net Application ? when i Update in SQL Server its run Perfectly but when i install on another Computer Its Shown Error"Invalid Field "+Updated Field Name Please Help SQL Server 2005 onwards:IF EXISTS(SELECT 1 FROM sys.columns WHERE Name = N'columnName' AND Object_ID = Object_ID(N'schemaName.tableName'))BEGIN -- Column ExistsENDIF COL_LENGTH('schemaName.tableName', 'columnName') IS NOT NULLBEGIN -- Column ExistsEND [XXX]

 vb.net-2010                     1 answers                     96 view
 2018-10-22         Hilary

Creative Ziio and android development, adb

Soo, I think this might be early, but I have a need for usb debugging drivers for this Creative Ziio 7" tablet I have in front of me. I had need for the same thing. I found this forum thread that specifies how to use the Google driver in order to access the device (instructions for both Linux and Windows). At the very least it was able to recognize my Ziio, however it was unable to access the screen. (I don't know if it is suitable for debugging though.)http://forum.xda-developers.com/showthread.php?t=882105 [XXX]

 android                     1 answers                     5 view
 2018-10-22         Hilary

Whats the connection in a ServiceBusTrigger?

What is the connection that needs to be defined with my service bus trigger (topic) for my Azure Function?The Run looks like thispublic static void Run([ServiceBusTrigger("testtopic", "testsubscription", AccessRights.Manage, Connection = "")]string mySbMsg, TraceWriter log)Is it the connection string for the Policy under Shared access policy of the ServiceBus (Endpoint:sb://...)? Connection is the name of a variable which contains connection string to a bus. You need to keep this variable in Application Settings of your Function App (accessible through the portal) and lo...

 c#                     1 answers                     6 view
 2018-10-22         Hilary

iOS black line on navigation controller transition

When the push/pop transition is performed on my view controller(which has large title and search bar embedded in navigation item), the black line appears briefly, like this:I've basically tried changing all the navigation bar colour related things, but nothing helped.Any help would be appreciated :) extension UINavigationBar { var customStyle: NavigationBarCustomStyle { set(style) { switch style { case .clear: self.setBackgroundImage(UIImage(), for: .default) self.shadowImage = UIImage() self.tintColor ...

 ios                     2 answers                     99 view
 2018-10-22         Hilary

clang error: linker command failed with exit code 1104

Hi I'm rather new to Windows command prompt(have only been using Linux-based OS)I'm trying to install OpenBLAS for Windows according to this tutorial.When I tried running step 6cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=ReleaseI get the following error Compiling the C compiler identification source file "CMakeCCompilerId.c" failed. Compiler: C:/ProgramData/Anaconda3/Library/bin/clang-cl.exe Build flags: /DWIN32;/D_WINDOWS;/W3 Id...

 c                     1 answers                     58 view

Page 1 of 144  |  Show More Pages:  Top Prev Next Last