Categories
Mastering Development

On click strike off items and move those items to the bottom of the list

I am trying to write a code where when a user clicks on an item on the list the item on that list should be strike off and and bring that item to the bottom of the list. ItemList.js <ul className=”list-group my-4″> <h2 className=”text-uppercase text-center custom-heading”>todo list</h2> <div className=”card card-body my-4 custom-card-bg”> <pre> {items .slice(0) […]

Categories
Mastering Development

How can i handle django nested models?

I have a User, Post and Tag model in Django. Tag model is not relevant for this topic. I am trying to get all the data in the front end with nested objects. I can succesfully did that.When i want to create a new post i send the post data to django and in django […]

Categories
User Help

OperationalError at /admin/products/product/add/ no such table: main.auth_user__old DJANGO [closed]

main.auth_user__old in django tutorial going through mosh created a web server.When saving some polls or products or set i get this error instead of going to be saved on the site. Heres the error OperationalError at /admin/products/product/add/ no such table: main.auth_user__old Request Method: POST Request URL: http://127.0.0.1:8000/admin/products/product/add/ Django Version: 2.1 Exception Type: OperationalError Exception Value: […]

Categories
CMS Joomla Mastering Development

Retrieve the value of a line a checkbox

I’m blocking on retrieving an item from a data list. My code: <div id=”contenu2″ class=”content”> <div> <form action=”” method=”post” id=”adminForm” name=”adminForm”> <table class=”table table-striped table-hover”> <thead> <tr> <th class=”k2ui-center<?php if($context == “modalselector”) echo ‘ k2ui-not-visible’; ?>”><input id=”k2<?php echo $this->params->get(‘backendListToggler’, ‘TogglerStandard’); ?>” type=”checkbox” name=”toggle” value=”” /></th> <th width=”1%”><?php echo JHtml::_(‘grid.sort’, ‘ID’, ‘id’, $this->sortDirection, $this->sortColumn); ?></th> <th […]

Categories
Linux Mastering Development

No response from target (vpnc)

I’m setting up a new VPN, provided by my university, using vpnc. I enter all the details exactly as they tell me, including gateway domain, ID, secret group password, plus my Xauth details. Then run as sudo vpnc-connect FILE. I get vpnc: no response from target This and this post suggest a firewall problem. However, […]

Categories
Mastering Development User Help

Powershell script running in Task Scheduler not producing results

I’m trying to run a Powershell script file as a Scheduled Task in Windows Server 2012. The script selects events in Event Viewer using an xml filter and saves them into a text file. The script file is named Sugar2SvcNowLog.ps1 and contains this text: Get-WinEvent -FilterXml ([xml] (Get-Content “Desktop\Sugar2SvcNow.xml”)) | format-table ProviderName, TimeCreated, Id, LevelDisplayName, […]

Categories
Mastering Development User Help

Powershell script running in Task Scheduler not producing results

I’m trying to run a Powershell script file as a Scheduled Task in Windows Server 2012. The script selects events in Event Viewer using an xml filter and saves them into a text file. The script file is named Sugar2SvcNowLog.ps1 and contains this text: Get-WinEvent -FilterXml ([xml] (Get-Content “Desktop\Sugar2SvcNow.xml”)) | format-table ProviderName, TimeCreated, Id, LevelDisplayName, […]

Categories
Mastering Development

DictReader not behaving as expected

My reader doesn’t read and print the rows of the CSV file created in the code above it. The CSV file is generated and is structured as follows (pasted from the CSV file)… id,Timing,GETQUOTE,PORTFOLIO,GETHOLDINGS,LOGOUT,QUOTES,GETCLOSEDORDERS,BUY,HOME,SELL 0,.,.,.,.,.,.,.,.,.,. 1,.,.,.,.,.,.,.,.,.,. 2,.,.,.,.,.,.,.,.,.,. Output from ‘print r’ print r: {‘ ‘: None, “‘”: None, ‘,’: None, ‘C’: None, ‘B’: None, ‘E’: […]

Categories
Mastering Development

IndexOutOfBound Exception while setting the data in recyclerview from sqlite database

I am fetching data from sqlite and filling it into recyclerview, but while filling the data i am getting IndexOutOfBoundException in my logcat. Can anyone tell me why i am getting this exception ? Databasehelper class code: public class DatabaseHelper extends SQLiteOpenHelper { public static final String DATABASE_NAME = “history.db”; public static final String TABLE_NAME […]

Categories
Mastering Development

Hibernate / Spring: EntityManager.lock would work as expected, em.find not

i am trying to use manual locking inside a spring @Transactional method, using EntityManager.find(class, id, LockModeType.PESSIMISTIC_WRITE); However, when viewing the sql, hibernate does NOT generate any select … for update statements (acquire an exclusive lock on the DB row) as i would expect, and the method does not synchronize correctly. Strangely, calling em.lock() after fetching […]